@wuwei-labs/srsly 2.0.0-beta.16 → 2.0.0-beta.18
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 +80 -21
- package/dist/cjs/codama/accounts/index.js +0 -1
- package/dist/cjs/codama/accounts/index.js.map +1 -1
- package/dist/cjs/codama/errors/srsly.js +7 -1
- package/dist/cjs/codama/errors/srsly.js.map +1 -1
- package/dist/cjs/codama/instructions/acceptRental.js +13 -13
- package/dist/cjs/codama/instructions/acceptRental.js.map +1 -1
- package/dist/cjs/codama/instructions/closeContract.js +13 -13
- package/dist/cjs/codama/instructions/closeContract.js.map +1 -1
- package/dist/cjs/codama/instructions/createContract.js +13 -13
- package/dist/cjs/codama/instructions/createContract.js.map +1 -1
- package/dist/cjs/codama/programs/srsly.js +2 -6
- package/dist/cjs/codama/programs/srsly.js.map +1 -1
- package/dist/cjs/contract/close.js +3 -3
- package/dist/cjs/contract/close.js.map +1 -1
- package/dist/cjs/contract/create.js +12 -8
- package/dist/cjs/contract/create.js.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/rental/accept.js +6 -6
- package/dist/cjs/rental/accept.js.map +1 -1
- package/dist/cjs/utils/config.js +12 -0
- package/dist/cjs/utils/config.js.map +1 -1
- package/dist/cjs/utils/constants.js +20 -4
- package/dist/cjs/utils/constants.js.map +1 -1
- package/dist/esm/codama/accounts/index.js +0 -1
- package/dist/esm/codama/accounts/index.js.map +1 -1
- package/dist/esm/codama/errors/srsly.js +6 -0
- package/dist/esm/codama/errors/srsly.js.map +1 -1
- package/dist/esm/codama/instructions/acceptRental.js +13 -13
- package/dist/esm/codama/instructions/acceptRental.js.map +1 -1
- package/dist/esm/codama/instructions/closeContract.js +13 -13
- package/dist/esm/codama/instructions/closeContract.js.map +1 -1
- package/dist/esm/codama/instructions/createContract.js +13 -13
- package/dist/esm/codama/instructions/createContract.js.map +1 -1
- package/dist/esm/codama/programs/srsly.js +2 -6
- package/dist/esm/codama/programs/srsly.js.map +1 -1
- package/dist/esm/contract/close.js +4 -4
- package/dist/esm/contract/close.js.map +1 -1
- package/dist/esm/contract/create.js +13 -9
- package/dist/esm/contract/create.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/rental/accept.js +7 -7
- package/dist/esm/rental/accept.js.map +1 -1
- package/dist/esm/utils/config.js +12 -0
- package/dist/esm/utils/config.js.map +1 -1
- package/dist/esm/utils/constants.js +18 -4
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/types/codama/accounts/index.d.ts +0 -1
- package/dist/types/codama/accounts/index.d.ts.map +1 -1
- package/dist/types/codama/errors/srsly.d.ts +5 -1
- package/dist/types/codama/errors/srsly.d.ts.map +1 -1
- package/dist/types/codama/instructions/acceptRental.d.ts +26 -26
- package/dist/types/codama/instructions/acceptRental.d.ts.map +1 -1
- package/dist/types/codama/instructions/closeContract.d.ts +21 -21
- package/dist/types/codama/instructions/closeContract.d.ts.map +1 -1
- package/dist/types/codama/instructions/createContract.d.ts +19 -19
- package/dist/types/codama/instructions/createContract.d.ts.map +1 -1
- package/dist/types/codama/programs/srsly.d.ts +2 -3
- package/dist/types/codama/programs/srsly.d.ts.map +1 -1
- package/dist/types/contract/close.d.ts +3 -3
- package/dist/types/contract/close.d.ts.map +1 -1
- package/dist/types/contract/create.d.ts +8 -3
- package/dist/types/contract/create.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/rental/accept.d.ts +5 -5
- package/dist/types/rental/accept.d.ts.map +1 -1
- package/dist/types/utils/config.d.ts +11 -0
- package/dist/types/utils/config.d.ts.map +1 -1
- package/dist/types/utils/constants.d.ts +12 -6
- package/dist/types/utils/constants.d.ts.map +1 -1
- package/package.json +1 -1
- package/target/idl/srsly.json +65 -107
- package/dist/cjs/codama/accounts/fleet.js +0 -77
- package/dist/cjs/codama/accounts/fleet.js.map +0 -1
- package/dist/esm/codama/accounts/fleet.js +0 -64
- package/dist/esm/codama/accounts/fleet.js.map +0 -1
- package/dist/types/codama/accounts/fleet.d.ts +0 -38
- package/dist/types/codama/accounts/fleet.d.ts.map +0 -1
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* This code was AUTOGENERATED using the codama library.
|
|
4
|
-
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5
|
-
* to add features, then rerun codama to update it.
|
|
6
|
-
*
|
|
7
|
-
* @see https://github.com/codama-idl/codama
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.FLEET_DISCRIMINATOR = void 0;
|
|
11
|
-
exports.getFleetDiscriminatorBytes = getFleetDiscriminatorBytes;
|
|
12
|
-
exports.getFleetEncoder = getFleetEncoder;
|
|
13
|
-
exports.getFleetDecoder = getFleetDecoder;
|
|
14
|
-
exports.getFleetCodec = getFleetCodec;
|
|
15
|
-
exports.decodeFleet = decodeFleet;
|
|
16
|
-
exports.fetchFleet = fetchFleet;
|
|
17
|
-
exports.fetchMaybeFleet = fetchMaybeFleet;
|
|
18
|
-
exports.fetchAllFleet = fetchAllFleet;
|
|
19
|
-
exports.fetchAllMaybeFleet = fetchAllMaybeFleet;
|
|
20
|
-
exports.getFleetSize = getFleetSize;
|
|
21
|
-
const kit_1 = require("@solana/kit");
|
|
22
|
-
exports.FLEET_DISCRIMINATOR = new Uint8Array([
|
|
23
|
-
109, 207, 251, 48, 106, 2, 136, 163,
|
|
24
|
-
]);
|
|
25
|
-
function getFleetDiscriminatorBytes() {
|
|
26
|
-
return (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8).encode(exports.FLEET_DISCRIMINATOR);
|
|
27
|
-
}
|
|
28
|
-
function getFleetEncoder() {
|
|
29
|
-
return (0, kit_1.transformEncoder)((0, kit_1.getStructEncoder)([
|
|
30
|
-
['discriminator', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 8)],
|
|
31
|
-
['version', (0, kit_1.getU8Encoder)()],
|
|
32
|
-
['gameId', (0, kit_1.getAddressEncoder)()],
|
|
33
|
-
['ownerProfile', (0, kit_1.getAddressEncoder)()],
|
|
34
|
-
['fleetShips', (0, kit_1.getAddressEncoder)()],
|
|
35
|
-
['subProfile', (0, kit_1.getAddressEncoder)()],
|
|
36
|
-
['subProfileInvalidator', (0, kit_1.getAddressEncoder)()],
|
|
37
|
-
]), (value) => ({ ...value, discriminator: exports.FLEET_DISCRIMINATOR }));
|
|
38
|
-
}
|
|
39
|
-
function getFleetDecoder() {
|
|
40
|
-
return (0, kit_1.getStructDecoder)([
|
|
41
|
-
['discriminator', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 8)],
|
|
42
|
-
['version', (0, kit_1.getU8Decoder)()],
|
|
43
|
-
['gameId', (0, kit_1.getAddressDecoder)()],
|
|
44
|
-
['ownerProfile', (0, kit_1.getAddressDecoder)()],
|
|
45
|
-
['fleetShips', (0, kit_1.getAddressDecoder)()],
|
|
46
|
-
['subProfile', (0, kit_1.getAddressDecoder)()],
|
|
47
|
-
['subProfileInvalidator', (0, kit_1.getAddressDecoder)()],
|
|
48
|
-
]);
|
|
49
|
-
}
|
|
50
|
-
function getFleetCodec() {
|
|
51
|
-
return (0, kit_1.combineCodec)(getFleetEncoder(), getFleetDecoder());
|
|
52
|
-
}
|
|
53
|
-
function decodeFleet(encodedAccount) {
|
|
54
|
-
return (0, kit_1.decodeAccount)(encodedAccount, getFleetDecoder());
|
|
55
|
-
}
|
|
56
|
-
async function fetchFleet(rpc, address, config) {
|
|
57
|
-
const maybeAccount = await fetchMaybeFleet(rpc, address, config);
|
|
58
|
-
(0, kit_1.assertAccountExists)(maybeAccount);
|
|
59
|
-
return maybeAccount;
|
|
60
|
-
}
|
|
61
|
-
async function fetchMaybeFleet(rpc, address, config) {
|
|
62
|
-
const maybeAccount = await (0, kit_1.fetchEncodedAccount)(rpc, address, config);
|
|
63
|
-
return decodeFleet(maybeAccount);
|
|
64
|
-
}
|
|
65
|
-
async function fetchAllFleet(rpc, addresses, config) {
|
|
66
|
-
const maybeAccounts = await fetchAllMaybeFleet(rpc, addresses, config);
|
|
67
|
-
(0, kit_1.assertAccountsExist)(maybeAccounts);
|
|
68
|
-
return maybeAccounts;
|
|
69
|
-
}
|
|
70
|
-
async function fetchAllMaybeFleet(rpc, addresses, config) {
|
|
71
|
-
const maybeAccounts = await (0, kit_1.fetchEncodedAccounts)(rpc, addresses, config);
|
|
72
|
-
return maybeAccounts.map((maybeAccount) => decodeFleet(maybeAccount));
|
|
73
|
-
}
|
|
74
|
-
function getFleetSize() {
|
|
75
|
-
return 169;
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=fleet.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fleet.js","sourceRoot":"","sources":["../../../../src/codama/accounts/fleet.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAqCH,gEAEC;AAqBD,0CAaC;AAED,0CAUC;AAED,sCAEC;AAQD,kCAOC;AAED,gCAQC;AAED,0CAOC;AAED,sCAQC;AAED,gDAOC;AAED,oCAEC;AAhJD,qCA6BqB;AAER,QAAA,mBAAmB,GAAG,IAAI,UAAU,CAAC;IAChD,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG;CACpC,CAAC,CAAC;AAEH,SAAgB,0BAA0B;IACxC,OAAO,IAAA,oBAAc,EAAC,IAAA,qBAAe,GAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,2BAAmB,CAAC,CAAC;AAC1E,CAAC;AAqBD,SAAgB,eAAe;IAC7B,OAAO,IAAA,sBAAgB,EACrB,IAAA,sBAAgB,EAAC;QACf,CAAC,eAAe,EAAE,IAAA,oBAAc,EAAC,IAAA,qBAAe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MAA2B;IAE3B,MAAM,YAAY,GAAG,MAAM,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACjE,IAAA,yBAAmB,EAAC,YAAY,CAAC,CAAC;IAClC,OAAO,YAAY,CAAC;AACtB,CAAC;AAEM,KAAK,UAAU,eAAe,CACnC,GAA8C,EAC9C,OAA0B,EAC1B,MAA2B;IAE3B,MAAM,YAAY,GAAG,MAAM,IAAA,yBAAmB,EAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACrE,OAAO,WAAW,CAAC,YAAY,CAAC,CAAC;AACnC,CAAC;AAEM,KAAK,UAAU,aAAa,CACjC,GAA+C,EAC/C,SAAyB,EACzB,MAA4B;IAE5B,MAAM,aAAa,GAAG,MAAM,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IACvE,IAAA,yBAAmB,EAAC,aAAa,CAAC,CAAC;IACnC,OAAO,aAAa,CAAC;AACvB,CAAC;AAEM,KAAK,UAAU,kBAAkB,CACtC,GAA+C,EAC/C,SAAyB,EACzB,MAA4B;IAE5B,MAAM,aAAa,GAAG,MAAM,IAAA,0BAAoB,EAAC,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IACzE,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;AACxE,CAAC;AAED,SAAgB,YAAY;IAC1B,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was AUTOGENERATED using the codama library.
|
|
3
|
-
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
-
* to add features, then rerun codama to update it.
|
|
5
|
-
*
|
|
6
|
-
* @see https://github.com/codama-idl/codama
|
|
7
|
-
*/
|
|
8
|
-
import { assertAccountExists, assertAccountsExist, combineCodec, decodeAccount, fetchEncodedAccount, fetchEncodedAccounts, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesDecoder, getBytesEncoder, getStructDecoder, getStructEncoder, getU8Decoder, getU8Encoder, transformEncoder, } from '@solana/kit';
|
|
9
|
-
export const FLEET_DISCRIMINATOR = new Uint8Array([
|
|
10
|
-
109, 207, 251, 48, 106, 2, 136, 163,
|
|
11
|
-
]);
|
|
12
|
-
export function getFleetDiscriminatorBytes() {
|
|
13
|
-
return fixEncoderSize(getBytesEncoder(), 8).encode(FLEET_DISCRIMINATOR);
|
|
14
|
-
}
|
|
15
|
-
export function getFleetEncoder() {
|
|
16
|
-
return transformEncoder(getStructEncoder([
|
|
17
|
-
['discriminator', fixEncoderSize(getBytesEncoder(), 8)],
|
|
18
|
-
['version', getU8Encoder()],
|
|
19
|
-
['gameId', getAddressEncoder()],
|
|
20
|
-
['ownerProfile', getAddressEncoder()],
|
|
21
|
-
['fleetShips', getAddressEncoder()],
|
|
22
|
-
['subProfile', getAddressEncoder()],
|
|
23
|
-
['subProfileInvalidator', getAddressEncoder()],
|
|
24
|
-
]), (value) => ({ ...value, discriminator: FLEET_DISCRIMINATOR }));
|
|
25
|
-
}
|
|
26
|
-
export function getFleetDecoder() {
|
|
27
|
-
return getStructDecoder([
|
|
28
|
-
['discriminator', fixDecoderSize(getBytesDecoder(), 8)],
|
|
29
|
-
['version', getU8Decoder()],
|
|
30
|
-
['gameId', getAddressDecoder()],
|
|
31
|
-
['ownerProfile', getAddressDecoder()],
|
|
32
|
-
['fleetShips', getAddressDecoder()],
|
|
33
|
-
['subProfile', getAddressDecoder()],
|
|
34
|
-
['subProfileInvalidator', getAddressDecoder()],
|
|
35
|
-
]);
|
|
36
|
-
}
|
|
37
|
-
export function getFleetCodec() {
|
|
38
|
-
return combineCodec(getFleetEncoder(), getFleetDecoder());
|
|
39
|
-
}
|
|
40
|
-
export function decodeFleet(encodedAccount) {
|
|
41
|
-
return decodeAccount(encodedAccount, getFleetDecoder());
|
|
42
|
-
}
|
|
43
|
-
export async function fetchFleet(rpc, address, config) {
|
|
44
|
-
const maybeAccount = await fetchMaybeFleet(rpc, address, config);
|
|
45
|
-
assertAccountExists(maybeAccount);
|
|
46
|
-
return maybeAccount;
|
|
47
|
-
}
|
|
48
|
-
export async function fetchMaybeFleet(rpc, address, config) {
|
|
49
|
-
const maybeAccount = await fetchEncodedAccount(rpc, address, config);
|
|
50
|
-
return decodeFleet(maybeAccount);
|
|
51
|
-
}
|
|
52
|
-
export async function fetchAllFleet(rpc, addresses, config) {
|
|
53
|
-
const maybeAccounts = await fetchAllMaybeFleet(rpc, addresses, config);
|
|
54
|
-
assertAccountsExist(maybeAccounts);
|
|
55
|
-
return maybeAccounts;
|
|
56
|
-
}
|
|
57
|
-
export async function fetchAllMaybeFleet(rpc, addresses, config) {
|
|
58
|
-
const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);
|
|
59
|
-
return maybeAccounts.map((maybeAccount) => decodeFleet(maybeAccount));
|
|
60
|
-
}
|
|
61
|
-
export function getFleetSize() {
|
|
62
|
-
return 169;
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=fleet.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fleet.js","sourceRoot":"","sources":["../../../../src/codama/accounts/fleet.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,gBAAgB,GAYjB,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,UAAU,CAAC;IAChD,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,G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.
|
|
3
|
-
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
-
* to add features, then rerun codama to update it.
|
|
5
|
-
*
|
|
6
|
-
* @see https://github.com/codama-idl/codama
|
|
7
|
-
*/
|
|
8
|
-
import { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type Codec, type Decoder, type EncodedAccount, type Encoder, type FetchAccountConfig, type FetchAccountsConfig, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/kit';
|
|
9
|
-
export declare const FLEET_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
10
|
-
export declare function getFleetDiscriminatorBytes(): ReadonlyUint8Array;
|
|
11
|
-
export type Fleet = {
|
|
12
|
-
discriminator: ReadonlyUint8Array;
|
|
13
|
-
version: number;
|
|
14
|
-
gameId: Address;
|
|
15
|
-
ownerProfile: Address;
|
|
16
|
-
fleetShips: Address;
|
|
17
|
-
subProfile: Address;
|
|
18
|
-
subProfileInvalidator: Address;
|
|
19
|
-
};
|
|
20
|
-
export type FleetArgs = {
|
|
21
|
-
version: number;
|
|
22
|
-
gameId: Address;
|
|
23
|
-
ownerProfile: Address;
|
|
24
|
-
fleetShips: Address;
|
|
25
|
-
subProfile: Address;
|
|
26
|
-
subProfileInvalidator: Address;
|
|
27
|
-
};
|
|
28
|
-
export declare function getFleetEncoder(): Encoder<FleetArgs>;
|
|
29
|
-
export declare function getFleetDecoder(): Decoder<Fleet>;
|
|
30
|
-
export declare function getFleetCodec(): Codec<FleetArgs, Fleet>;
|
|
31
|
-
export declare function decodeFleet<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<Fleet, TAddress>;
|
|
32
|
-
export declare function decodeFleet<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<Fleet, TAddress>;
|
|
33
|
-
export declare function fetchFleet<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<Fleet, TAddress>>;
|
|
34
|
-
export declare function fetchMaybeFleet<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<Fleet, TAddress>>;
|
|
35
|
-
export declare function fetchAllFleet(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<Fleet>[]>;
|
|
36
|
-
export declare function fetchAllMaybeFleet(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<Fleet>[]>;
|
|
37
|
-
export declare function getFleetSize(): number;
|
|
38
|
-
//# sourceMappingURL=fleet.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fleet.d.ts","sourceRoot":"","sources":["../../../../src/codama/accounts/fleet.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAKL,mBAAmB,EACnB,oBAAoB,EAYpB,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,mBAAmB,yBAE9B,CAAC;AAEH,wBAAgB,0BAA0B,uBAEzC;AAED,MAAM,MAAM,KAAK,GAAG;IAClB,aAAa,EAAE,kBAAkB,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,qBAAqB,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,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