@latticexyz/world-module-erc20 2.2.22-fdb727e847024560315c10ebf32c1f924755ffe9 → 2.2.22
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/dist/{_esm-H47RQ4ED.js → _esm-4QBXERIC.js} +136 -131
- package/dist/_esm-4QBXERIC.js.map +1 -0
- package/dist/{ccip-VIBPEQNI.js → ccip-POWS7KFG.js} +3 -3
- package/dist/{chunk-XE443CMG.js → chunk-5LBWQX65.js} +732 -341
- package/dist/chunk-5LBWQX65.js.map +1 -0
- package/dist/chunk-Y6LDJZ7L.js +408 -0
- package/dist/chunk-Y6LDJZ7L.js.map +1 -0
- package/dist/internal.js +2 -2
- package/dist/{secp256k1-QT34R5PW.js → secp256k1-QCGY4Z6Q.js} +405 -624
- package/dist/secp256k1-QCGY4Z6Q.js.map +1 -0
- package/package.json +8 -8
- package/dist/_esm-H47RQ4ED.js.map +0 -1
- package/dist/chunk-M5FHJZR5.js +0 -139
- package/dist/chunk-M5FHJZR5.js.map +0 -1
- package/dist/chunk-XE443CMG.js.map +0 -1
- package/dist/secp256k1-QT34R5PW.js.map +0 -1
- /package/dist/{ccip-VIBPEQNI.js.map → ccip-POWS7KFG.js.map} +0 -0
package/dist/chunk-M5FHJZR5.js
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/cryptoNode.js
|
|
2
|
-
import * as nc from "node:crypto";
|
|
3
|
-
var crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && "randomBytes" in nc ? nc : void 0;
|
|
4
|
-
|
|
5
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/_assert.js
|
|
6
|
-
function anumber(n) {
|
|
7
|
-
if (!Number.isSafeInteger(n) || n < 0)
|
|
8
|
-
throw new Error("positive integer expected, got " + n);
|
|
9
|
-
}
|
|
10
|
-
function isBytes(a) {
|
|
11
|
-
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
12
|
-
}
|
|
13
|
-
function abytes(b, ...lengths) {
|
|
14
|
-
if (!isBytes(b))
|
|
15
|
-
throw new Error("Uint8Array expected");
|
|
16
|
-
if (lengths.length > 0 && !lengths.includes(b.length))
|
|
17
|
-
throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b.length);
|
|
18
|
-
}
|
|
19
|
-
function ahash(h) {
|
|
20
|
-
if (typeof h !== "function" || typeof h.create !== "function")
|
|
21
|
-
throw new Error("Hash should be wrapped by utils.wrapConstructor");
|
|
22
|
-
anumber(h.outputLen);
|
|
23
|
-
anumber(h.blockLen);
|
|
24
|
-
}
|
|
25
|
-
function aexists(instance, checkFinished = true) {
|
|
26
|
-
if (instance.destroyed)
|
|
27
|
-
throw new Error("Hash instance has been destroyed");
|
|
28
|
-
if (checkFinished && instance.finished)
|
|
29
|
-
throw new Error("Hash#digest() has already been called");
|
|
30
|
-
}
|
|
31
|
-
function aoutput(out, instance) {
|
|
32
|
-
abytes(out);
|
|
33
|
-
const min = instance.outputLen;
|
|
34
|
-
if (out.length < min) {
|
|
35
|
-
throw new Error("digestInto() expects output buffer of length at least " + min);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/utils.js
|
|
40
|
-
function u32(arr) {
|
|
41
|
-
return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
|
42
|
-
}
|
|
43
|
-
function createView(arr) {
|
|
44
|
-
return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
|
|
45
|
-
}
|
|
46
|
-
function rotr(word, shift) {
|
|
47
|
-
return word << 32 - shift | word >>> shift;
|
|
48
|
-
}
|
|
49
|
-
var isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
|
|
50
|
-
function byteSwap(word) {
|
|
51
|
-
return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
|
|
52
|
-
}
|
|
53
|
-
function byteSwap32(arr) {
|
|
54
|
-
for (let i = 0; i < arr.length; i++) {
|
|
55
|
-
arr[i] = byteSwap(arr[i]);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
function utf8ToBytes(str) {
|
|
59
|
-
if (typeof str !== "string")
|
|
60
|
-
throw new Error("utf8ToBytes expected string, got " + typeof str);
|
|
61
|
-
return new Uint8Array(new TextEncoder().encode(str));
|
|
62
|
-
}
|
|
63
|
-
function toBytes(data) {
|
|
64
|
-
if (typeof data === "string")
|
|
65
|
-
data = utf8ToBytes(data);
|
|
66
|
-
abytes(data);
|
|
67
|
-
return data;
|
|
68
|
-
}
|
|
69
|
-
function concatBytes(...arrays) {
|
|
70
|
-
let sum = 0;
|
|
71
|
-
for (let i = 0; i < arrays.length; i++) {
|
|
72
|
-
const a = arrays[i];
|
|
73
|
-
abytes(a);
|
|
74
|
-
sum += a.length;
|
|
75
|
-
}
|
|
76
|
-
const res = new Uint8Array(sum);
|
|
77
|
-
for (let i = 0, pad = 0; i < arrays.length; i++) {
|
|
78
|
-
const a = arrays[i];
|
|
79
|
-
res.set(a, pad);
|
|
80
|
-
pad += a.length;
|
|
81
|
-
}
|
|
82
|
-
return res;
|
|
83
|
-
}
|
|
84
|
-
var Hash = class {
|
|
85
|
-
// Safe version that clones internal state
|
|
86
|
-
clone() {
|
|
87
|
-
return this._cloneInto();
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
function wrapConstructor(hashCons) {
|
|
91
|
-
const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
|
|
92
|
-
const tmp = hashCons();
|
|
93
|
-
hashC.outputLen = tmp.outputLen;
|
|
94
|
-
hashC.blockLen = tmp.blockLen;
|
|
95
|
-
hashC.create = () => hashCons();
|
|
96
|
-
return hashC;
|
|
97
|
-
}
|
|
98
|
-
function wrapXOFConstructorWithOpts(hashCons) {
|
|
99
|
-
const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
|
|
100
|
-
const tmp = hashCons({});
|
|
101
|
-
hashC.outputLen = tmp.outputLen;
|
|
102
|
-
hashC.blockLen = tmp.blockLen;
|
|
103
|
-
hashC.create = (opts) => hashCons(opts);
|
|
104
|
-
return hashC;
|
|
105
|
-
}
|
|
106
|
-
function randomBytes(bytesLength = 32) {
|
|
107
|
-
if (crypto && typeof crypto.getRandomValues === "function") {
|
|
108
|
-
return crypto.getRandomValues(new Uint8Array(bytesLength));
|
|
109
|
-
}
|
|
110
|
-
if (crypto && typeof crypto.randomBytes === "function") {
|
|
111
|
-
return crypto.randomBytes(bytesLength);
|
|
112
|
-
}
|
|
113
|
-
throw new Error("crypto.getRandomValues must be defined");
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export {
|
|
117
|
-
anumber,
|
|
118
|
-
abytes,
|
|
119
|
-
ahash,
|
|
120
|
-
aexists,
|
|
121
|
-
aoutput,
|
|
122
|
-
u32,
|
|
123
|
-
createView,
|
|
124
|
-
rotr,
|
|
125
|
-
isLE,
|
|
126
|
-
byteSwap32,
|
|
127
|
-
toBytes,
|
|
128
|
-
concatBytes,
|
|
129
|
-
Hash,
|
|
130
|
-
wrapConstructor,
|
|
131
|
-
wrapXOFConstructorWithOpts,
|
|
132
|
-
randomBytes
|
|
133
|
-
};
|
|
134
|
-
/*! Bundled license information:
|
|
135
|
-
|
|
136
|
-
@noble/hashes/esm/utils.js:
|
|
137
|
-
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
138
|
-
*/
|
|
139
|
-
//# sourceMappingURL=chunk-M5FHJZR5.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/src/cryptoNode.ts","../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/src/_assert.ts","../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/src/utils.ts"],"sourcesContent":["/**\n * Internal webcrypto alias.\n * We prefer WebCrypto aka globalThis.crypto, which exists in node.js 16+.\n * Falls back to Node.js built-in crypto for Node.js <=v14.\n * See utils.ts for details.\n * @module\n */\n// @ts-ignore\nimport * as nc from 'node:crypto';\nexport const crypto: any =\n nc && typeof nc === 'object' && 'webcrypto' in nc\n ? (nc.webcrypto as any)\n : nc && typeof nc === 'object' && 'randomBytes' in nc\n ? nc\n : undefined;\n","/**\n * Internal assertion helpers.\n * @module\n */\n\n/** Asserts something is positive integer. */\nfunction anumber(n: number): void {\n if (!Number.isSafeInteger(n) || n < 0) throw new Error('positive integer expected, got ' + n);\n}\n\n/** Is number an Uint8Array? Copied from utils for perf. */\nfunction isBytes(a: unknown): a is Uint8Array {\n return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\n\n/** Asserts something is Uint8Array. */\nfunction abytes(b: Uint8Array | undefined, ...lengths: number[]): void {\n if (!isBytes(b)) throw new Error('Uint8Array expected');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error('Uint8Array expected of length ' + lengths + ', got length=' + b.length);\n}\n\n/** Hash interface. */\nexport type Hash = {\n (data: Uint8Array): Uint8Array;\n blockLen: number;\n outputLen: number;\n create: any;\n};\n\n/** Asserts something is hash */\nfunction ahash(h: Hash): void {\n if (typeof h !== 'function' || typeof h.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n anumber(h.outputLen);\n anumber(h.blockLen);\n}\n\n/** Asserts a hash instance has not been destroyed / finished */\nfunction aexists(instance: any, checkFinished = true): void {\n if (instance.destroyed) throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished) throw new Error('Hash#digest() has already been called');\n}\n\n/** Asserts output is properly-sized byte array */\nfunction aoutput(out: any, instance: any): void {\n abytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error('digestInto() expects output buffer of length at least ' + min);\n }\n}\n\nexport { anumber, abytes, ahash, aexists, aoutput };\n","/**\n * Utilities for hex, bytes, CSPRNG.\n * @module\n */\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nimport { abytes } from './_assert.js';\n// export { isBytes } from './_assert.js';\n// We can't reuse isBytes from _assert, because somehow this causes huge perf issues\nexport function isBytes(a: unknown): a is Uint8Array {\n return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\n\n// prettier-ignore\nexport type TypedArray = Int8Array | Uint8ClampedArray | Uint8Array |\n Uint16Array | Int16Array | Uint32Array | Int32Array;\n\n// Cast array to different type\nexport function u8(arr: TypedArray): Uint8Array {\n return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\n}\nexport function u32(arr: TypedArray): Uint32Array {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n}\n\n// Cast array to view\nexport function createView(arr: TypedArray): DataView {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n\n/** The rotate right (circular right shift) operation for uint32 */\nexport function rotr(word: number, shift: number): number {\n return (word << (32 - shift)) | (word >>> shift);\n}\n/** The rotate left (circular left shift) operation for uint32 */\nexport function rotl(word: number, shift: number): number {\n return (word << shift) | ((word >>> (32 - shift)) >>> 0);\n}\n\n/** Is current platform little-endian? Most are. Big-Endian platform: IBM */\nexport const isLE: boolean = /* @__PURE__ */ (() =>\n new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44)();\n// The byte swap operation for uint32\nexport function byteSwap(word: number): number {\n return (\n ((word << 24) & 0xff000000) |\n ((word << 8) & 0xff0000) |\n ((word >>> 8) & 0xff00) |\n ((word >>> 24) & 0xff)\n );\n}\n/** Conditionally byte swap if on a big-endian platform */\nexport const byteSwapIfBE: (n: number) => number = isLE\n ? (n: number) => n\n : (n: number) => byteSwap(n);\n\n/** In place byte swap for Uint32Array */\nexport function byteSwap32(arr: Uint32Array): void {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = byteSwap(arr[i]);\n }\n}\n\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) =>\n i.toString(16).padStart(2, '0')\n);\n/**\n * Convert byte array to hex string.\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes: Uint8Array): string {\n abytes(bytes);\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 } as const;\nfunction asciiToBase16(ch: number): number | undefined {\n if (ch >= asciis._0 && ch <= asciis._9) return ch - asciis._0; // '2' => 50-48\n if (ch >= asciis.A && ch <= asciis.F) return ch - (asciis.A - 10); // 'B' => 66-(65-10)\n if (ch >= asciis.a && ch <= asciis.f) return ch - (asciis.a - 10); // 'b' => 98-(97-10)\n return;\n}\n\n/**\n * Convert hex string to byte array.\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex: string): Uint8Array {\n if (typeof hex !== 'string') throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2) throw new Error('hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2; // multiply first octet, e.g. 'a3' => 10*16+3 => 160 + 3 => 163\n }\n return array;\n}\n\n/**\n * There is no setImmediate in browser and setTimeout is slow.\n * Call of async fn will return Promise, which will be fullfiled only on\n * next scheduler queue processing step and this is exactly what we need.\n */\nexport const nextTick = async (): Promise<void> => {};\n\n/** Returns control to thread each 'tick' ms to avoid blocking. */\nexport async function asyncLoop(\n iters: number,\n tick: number,\n cb: (i: number) => void\n): Promise<void> {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick) continue;\n await nextTick();\n ts += diff;\n }\n}\n\n// Global symbols in both browsers and Node.js since v11\n// See https://github.com/microsoft/TypeScript/issues/31535\ndeclare const TextEncoder: any;\n\n/**\n * Convert JS string to byte array.\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str: string): Uint8Array {\n if (typeof str !== 'string') throw new Error('utf8ToBytes expected string, got ' + typeof str);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n\n/** Accepted input of hash functions. Strings are converted to byte arrays. */\nexport type Input = Uint8Array | string;\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data: Input): Uint8Array {\n if (typeof data === 'string') data = utf8ToBytes(data);\n abytes(data);\n return data;\n}\n\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays: Uint8Array[]): Uint8Array {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n\n/** For runtime check if class implements interface */\nexport abstract class Hash<T extends Hash<T>> {\n abstract blockLen: number; // Bytes per block\n abstract outputLen: number; // Bytes in output\n abstract update(buf: Input): this;\n // Writes digest into buf\n abstract digestInto(buf: Uint8Array): void;\n abstract digest(): Uint8Array;\n /**\n * Resets internal state. Makes Hash instance unusable.\n * Reset is impossible for keyed hashes if key is consumed into state. If digest is not consumed\n * by user, they will need to manually call `destroy()` when zeroing is necessary.\n */\n abstract destroy(): void;\n /**\n * Clones hash instance. Unsafe: doesn't check whether `to` is valid. Can be used as `clone()`\n * when no options are passed.\n * Reasons to use `_cloneInto` instead of clone: 1) performance 2) reuse instance => all internal\n * buffers are overwritten => causes buffer overwrite which is used for digest in some cases.\n * There are no guarantees for clean-up because it's impossible in JS.\n */\n abstract _cloneInto(to?: T): T;\n // Safe version that clones internal state\n clone(): T {\n return this._cloneInto();\n }\n}\n\n/**\n * XOF: streaming API to read digest in chunks.\n * Same as 'squeeze' in keccak/k12 and 'seek' in blake3, but more generic name.\n * When hash used in XOF mode it is up to user to call '.destroy' afterwards, since we cannot\n * destroy state, next call can require more bytes.\n */\nexport type HashXOF<T extends Hash<T>> = Hash<T> & {\n xof(bytes: number): Uint8Array; // Read 'bytes' bytes from digest stream\n xofInto(buf: Uint8Array): Uint8Array; // read buf.length bytes from digest stream into buf\n};\n\ntype EmptyObj = {};\nexport function checkOpts<T1 extends EmptyObj, T2 extends EmptyObj>(\n defaults: T1,\n opts?: T2\n): T1 & T2 {\n if (opts !== undefined && {}.toString.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged as T1 & T2;\n}\n\n/** Hash function */\nexport type CHash = ReturnType<typeof wrapConstructor>;\n/** Hash function with output */\nexport type CHashO = ReturnType<typeof wrapConstructorWithOpts>;\n/** XOF with output */\nexport type CHashXO = ReturnType<typeof wrapXOFConstructorWithOpts>;\n\n/** Wraps hash function, creating an interface on top of it */\nexport function wrapConstructor<T extends Hash<T>>(\n hashCons: () => Hash<T>\n): {\n (msg: Input): Uint8Array;\n outputLen: number;\n blockLen: number;\n create(): Hash<T>;\n} {\n const hashC = (msg: Input): Uint8Array => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\n\nexport function wrapConstructorWithOpts<H extends Hash<H>, T extends Object>(\n hashCons: (opts?: T) => Hash<H>\n): {\n (msg: Input, opts?: T): Uint8Array;\n outputLen: number;\n blockLen: number;\n create(opts: T): Hash<H>;\n} {\n const hashC = (msg: Input, opts?: T): Uint8Array => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({} as T);\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts: T) => hashCons(opts);\n return hashC;\n}\n\nexport function wrapXOFConstructorWithOpts<H extends HashXOF<H>, T extends Object>(\n hashCons: (opts?: T) => HashXOF<H>\n): {\n (msg: Input, opts?: T): Uint8Array;\n outputLen: number;\n blockLen: number;\n create(opts: T): HashXOF<H>;\n} {\n const hashC = (msg: Input, opts?: T): Uint8Array => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({} as T);\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts: T) => hashCons(opts);\n return hashC;\n}\n\n/** Cryptographically secure PRNG. Uses internal OS-level `crypto.getRandomValues`. */\nexport function randomBytes(bytesLength = 32): Uint8Array {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n // Legacy Node.js compatibility\n if (crypto && typeof crypto.rand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