@pax2pay/model-banking 0.1.545 → 0.1.547
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/Account/Charge.ts +1 -1
- package/Client/Accounts/Charge.ts +20 -0
- package/Client/Accounts/index.ts +3 -0
- package/dist/cjs/Account/Charge.js +1 -1
- package/dist/cjs/Account/Charge.js.map +1 -1
- package/dist/cjs/Client/Accounts/Charge.d.ts +10 -0
- package/dist/cjs/Client/Accounts/Charge.js +20 -0
- package/dist/cjs/Client/Accounts/Charge.js.map +1 -0
- package/dist/cjs/Client/Accounts/index.d.ts +2 -0
- package/dist/cjs/Client/Accounts/index.js +3 -0
- package/dist/cjs/Client/Accounts/index.js.map +1 -1
- package/dist/mjs/Account/Charge.js +1 -1
- package/dist/mjs/Account/Charge.js.map +1 -1
- package/dist/mjs/Client/Accounts/Charge.d.ts +10 -0
- package/dist/mjs/Client/Accounts/Charge.js +16 -0
- package/dist/mjs/Client/Accounts/Charge.js.map +1 -0
- package/dist/mjs/Client/Accounts/index.d.ts +2 -0
- package/dist/mjs/Client/Accounts/index.js +3 -0
- package/dist/mjs/Client/Accounts/index.js.map +1 -1
- package/package.json +1 -1
package/Account/Charge.ts
CHANGED
|
@@ -33,7 +33,7 @@ export namespace Charge {
|
|
|
33
33
|
id: isly.string(),
|
|
34
34
|
})
|
|
35
35
|
export function fromCreatable(creatable: Creatable): Charge {
|
|
36
|
-
return { ...creatable, id: cryptly.Identifier.generate(
|
|
36
|
+
return { ...creatable, id: cryptly.Identifier.generate(4) }
|
|
37
37
|
}
|
|
38
38
|
export function evaluate(
|
|
39
39
|
charges: Charge[] = [],
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { gracely } from "gracely"
|
|
2
|
+
import { http } from "cloudly-http"
|
|
3
|
+
import { Account } from "../../Account"
|
|
4
|
+
|
|
5
|
+
export class Charge {
|
|
6
|
+
constructor(private readonly client: http.Client) {}
|
|
7
|
+
async create(account: string, charge: Account.Charge.Creatable): Promise<Account.Charge | gracely.Error> {
|
|
8
|
+
return this.client.post<Account.Charge>(`/account/${account}/charge`, charge)
|
|
9
|
+
}
|
|
10
|
+
async remove(account: string, id: string): Promise<Account.Charge | gracely.Error> {
|
|
11
|
+
return this.client.delete<Account.Charge>(`/account/${account}/charge/${id}`)
|
|
12
|
+
}
|
|
13
|
+
async replace(
|
|
14
|
+
account: string,
|
|
15
|
+
id: string,
|
|
16
|
+
charge: Account.Charge.Creatable
|
|
17
|
+
): Promise<Account.Charge | gracely.Error> {
|
|
18
|
+
return this.client.put<Account.Charge>(`/account/${account}/charge/${id}`, charge)
|
|
19
|
+
}
|
|
20
|
+
}
|
package/Client/Accounts/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { gracely } from "gracely"
|
|
|
2
2
|
import { http } from "cloudly-http"
|
|
3
3
|
import { Account } from "../../Account"
|
|
4
4
|
import { Buffer } from "./Buffer"
|
|
5
|
+
import { Charge } from "./Charge"
|
|
5
6
|
import { Counterparts } from "./Counterparts"
|
|
6
7
|
import { Details } from "./Details"
|
|
7
8
|
import { History } from "./History"
|
|
@@ -10,6 +11,7 @@ import { Status } from "./Status"
|
|
|
10
11
|
|
|
11
12
|
export class Accounts {
|
|
12
13
|
readonly buffer: Buffer
|
|
14
|
+
readonly charge: Charge
|
|
13
15
|
readonly details: Details
|
|
14
16
|
readonly rules: Rules
|
|
15
17
|
readonly status: Status
|
|
@@ -17,6 +19,7 @@ export class Accounts {
|
|
|
17
19
|
readonly history: History
|
|
18
20
|
constructor(private readonly client: http.Client) {
|
|
19
21
|
this.buffer = new Buffer(this.client)
|
|
22
|
+
this.charge = new Charge(this.client)
|
|
20
23
|
this.details = new Details(this.client)
|
|
21
24
|
this.rules = new Rules(this.client)
|
|
22
25
|
this.status = new Status(this.client)
|
|
@@ -23,7 +23,7 @@ var Charge;
|
|
|
23
23
|
id: isly_1.isly.string(),
|
|
24
24
|
});
|
|
25
25
|
function fromCreatable(creatable) {
|
|
26
|
-
return { ...creatable, id: cryptly_1.cryptly.Identifier.generate(
|
|
26
|
+
return { ...creatable, id: cryptly_1.cryptly.Identifier.generate(4) };
|
|
27
27
|
}
|
|
28
28
|
Charge.fromCreatable = fromCreatable;
|
|
29
29
|
function evaluate(charges = [], counterpart, currency, amount) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Charge.js","sourceRoot":"","sources":["../../../Account/Charge.ts"],"names":[],"mappings":";;;AAAA,qCAAiC;AACjC,iCAA6B;AAC7B,+BAA2B;AAC3B,kCAA8B;AAO9B,IAAiB,MAAM,CA8CtB;AA9CD,WAAiB,MAAM;IAUtB,IAAiB,SAAS,CAUzB;IAVD,WAAiB,SAAS;QACZ,cAAI,GAAG,WAAI,CAAC,MAAM,CAAY;YAC1C,WAAW,EAAE,WAAI,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,CAAC;YACpD,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE;YACnB,OAAO,EAAE,WAAI,CAAC,MAAM,CAAC;gBACpB,EAAE,EAAE,WAAI,CAAC,MAAM,CAA6B;oBAC3C,SAAS,EAAE,WAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE;iBACjD,CAAC;aACF,CAAC;SACF,CAAC,CAAA;IACH,CAAC,EAVgB,SAAS,GAAT,gBAAS,KAAT,gBAAS,QAUzB;IACY,WAAI,GAAG,SAAS,CAAC,IAAI,CAAC,MAAM,CAAS;QACjD,EAAE,EAAE,WAAI,CAAC,MAAM,EAAE;KACjB,CAAC,CAAA;IACF,SAAgB,aAAa,CAAC,SAAoB;QACjD,OAAO,EAAE,GAAG,SAAS,EAAE,EAAE,EAAE,iBAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"Charge.js","sourceRoot":"","sources":["../../../Account/Charge.ts"],"names":[],"mappings":";;;AAAA,qCAAiC;AACjC,iCA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I,CAAC;oBACX,WAAW,EAAE,MAAM,CAAC,WAAW;oBAC/B,IAAI,EAAE,UAAU;oBAChB,MAAM,EAAE,CAAC,aAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC;iBAC/D,CAAC,CAAA;QACJ,OAAO,MAAM,CAAA;IACd,CAAC;IAfe,eAAQ,WAevB,CAAA;IACD,SAAgB,GAAG,CAAC,OAAoC,EAAE,QAAwB;QACjF,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,aAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAA;IAC5F,CAAC;IAFe,UAAG,MAElB,CAAA;AACF,CAAC,EA9CgB,MAAM,sBAAN,MAAM,QA8CtB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { gracely } from "gracely";
|
|
2
|
+
import { http } from "cloudly-http";
|
|
3
|
+
import { Account } from "../../Account";
|
|
4
|
+
export declare class Charge {
|
|
5
|
+
private readonly client;
|
|
6
|
+
constructor(client: http.Client);
|
|
7
|
+
create(account: string, charge: Account.Charge.Creatable): Promise<Account.Charge | gracely.Error>;
|
|
8
|
+
remove(account: string, id: string): Promise<Account.Charge | gracely.Error>;
|
|
9
|
+
replace(account: string, id: string, charge: Account.Charge.Creatable): Promise<Account.Charge | gracely.Error>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Charge = void 0;
|
|
4
|
+
class Charge {
|
|
5
|
+
client;
|
|
6
|
+
constructor(client) {
|
|
7
|
+
this.client = client;
|
|
8
|
+
}
|
|
9
|
+
async create(account, charge) {
|
|
10
|
+
return this.client.post(`/account/${account}/charge`, charge);
|
|
11
|
+
}
|
|
12
|
+
async remove(account, id) {
|
|
13
|
+
return this.client.delete(`/account/${account}/charge/${id}`);
|
|
14
|
+
}
|
|
15
|
+
async replace(account, id, charge) {
|
|
16
|
+
return this.client.put(`/account/${account}/charge/${id}`, charge);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.Charge = Charge;
|
|
20
|
+
//# sourceMappingURL=Charge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Charge.js","sourceRoot":"","sources":["../../../../Client/Accounts/Charge.ts"],"names":[],"mappings":";;;AAIA,MAAa,MAAM;IACW;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,MAAgC;QAC7D,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAiB,YAAY,OAAO,SAAS,EAAE,MAAM,CAAC,CAAA;IAC9E,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,EAAU;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAiB,YAAY,OAAO,WAAW,EAAE,EAAE,CAAC,CAAA;IAC9E,CAAC;IACD,KAAK,CAAC,OAAO,CACZ,OAAe,EACf,EAAU,EACV,MAAgC;QAEhC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAiB,YAAY,OAAO,WAAW,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;IACnF,CAAC;CACD;AAfD,wBAeC"}
|
|
@@ -2,6 +2,7 @@ import { gracely } from "gracely";
|
|
|
2
2
|
import { http } from "cloudly-http";
|
|
3
3
|
import { Account } from "../../Account";
|
|
4
4
|
import { Buffer } from "./Buffer";
|
|
5
|
+
import { Charge } from "./Charge";
|
|
5
6
|
import { Counterparts } from "./Counterparts";
|
|
6
7
|
import { Details } from "./Details";
|
|
7
8
|
import { History } from "./History";
|
|
@@ -10,6 +11,7 @@ import { Status } from "./Status";
|
|
|
10
11
|
export declare class Accounts {
|
|
11
12
|
private readonly client;
|
|
12
13
|
readonly buffer: Buffer;
|
|
14
|
+
readonly charge: Charge;
|
|
13
15
|
readonly details: Details;
|
|
14
16
|
readonly rules: Rules;
|
|
15
17
|
readonly status: Status;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Accounts = void 0;
|
|
4
4
|
const Buffer_1 = require("./Buffer");
|
|
5
|
+
const Charge_1 = require("./Charge");
|
|
5
6
|
const Counterparts_1 = require("./Counterparts");
|
|
6
7
|
const Details_1 = require("./Details");
|
|
7
8
|
const History_1 = require("./History");
|
|
@@ -10,6 +11,7 @@ const Status_1 = require("./Status");
|
|
|
10
11
|
class Accounts {
|
|
11
12
|
client;
|
|
12
13
|
buffer;
|
|
14
|
+
charge;
|
|
13
15
|
details;
|
|
14
16
|
rules;
|
|
15
17
|
status;
|
|
@@ -18,6 +20,7 @@ class Accounts {
|
|
|
18
20
|
constructor(client) {
|
|
19
21
|
this.client = client;
|
|
20
22
|
this.buffer = new Buffer_1.Buffer(this.client);
|
|
23
|
+
this.charge = new Charge_1.Charge(this.client);
|
|
21
24
|
this.details = new Details_1.Details(this.client);
|
|
22
25
|
this.rules = new Rules_1.Rules(this.client);
|
|
23
26
|
this.status = new Status_1.Status(this.client);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Accounts/index.ts"],"names":[],"mappings":";;;AAGA,qCAAiC;AACjC,iDAA6C;AAC7C,uCAAmC;AACnC,uCAAmC;AACnC,mCAA+B;AAC/B,qCAAiC;AAEjC,MAAa,QAAQ;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Accounts/index.ts"],"names":[],"mappings":";;;AAGA,qCAAiC;AACjC,qCAAiC;AACjC,iDAA6C;AAC7C,uCAAmC;AACnC,uCAAmC;AACnC,mCAA+B;AA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: isly.string(),
|
|
21
21
|
});
|
|
22
22
|
function fromCreatable(creatable) {
|
|
23
|
-
return { ...creatable, id: cryptly.Identifier.generate(
|
|
23
|
+
return { ...creatable, id: cryptly.Identifier.generate(4) };
|
|
24
24
|
}
|
|
25
25
|
Charge.fromCreatable = fromCreatable;
|
|
26
26
|
function evaluate(charges = [], counterpart, currency, amount) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Charge.js","sourceRoot":"","sources":["../../../Account/Charge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAO9B,MAAM,KAAW,MAAM,CA8CtB;AA9CD,WAAiB,MAAM;IAUtB,IAAiB,SAAS,CAUzB;IAVD,WAAiB,SAAS;QACZ,cAAI,GAAG,IAAI,CAAC,MAAM,CAAY;YAC1C,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;YACpD,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;YACnB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC;gBACpB,EAAE,EAAE,IAAI,CAAC,MAAM,CAA6B;oBAC3C,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE;iBACjD,CAAC;aACF,CAAC;SACF,CAAC,CAAA;IACH,CAAC,EAVgB,SAAS,GAAT,gBAAS,KAAT,gBAAS,QAUzB;IACY,WAAI,GAAG,SAAS,CAAC,IAAI,CAAC,MAAM,CAAS;QACjD,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;KACjB,CAAC,CAAA;IACF,SAAgB,aAAa,CAAC,SAAoB;QACjD,OAAO,EAA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WAA0C,EAC1C,QAAwB,EACxB,MAAc;QAEd,MAAM,MAAM,GAAgC,EAAE,CAAA;QAC9C,KAAK,MAAM,MAAM,IAAI,OAAO;YAC3B,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;gBACvG,MAAM,CAAC,IAAI,CAAC;oBACX,WAAW,EAAE,MAAM,CAAC,WAAW;oBAC/B,IAAI,EAAE,UAAU;oBAChB,MAAM,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC;iBAC/D,CAAC,CAAA;QACJ,OAAO,MAAM,CAAA;IACd,CAAC;IAfe,eAAQ,WAevB,CAAA;IACD,SAAgB,GAAG,CAAC,OAAoC,EAAE,QAAwB;QACjF,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAA;IAC5F,CAAC;IAFe,UAAG,MAElB,CAAA;AACF,CAAC,EA9CgB,MAAM,KAAN,MAAM,QA8CtB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { gracely } from "gracely";
|
|
2
|
+
import { http } from "cloudly-http";
|
|
3
|
+
import { Account } from "../../Account";
|
|
4
|
+
export declare class Charge {
|
|
5
|
+
private readonly client;
|
|
6
|
+
constructor(client: http.Client);
|
|
7
|
+
create(account: string, charge: Account.Charge.Creatable): Promise<Account.Charge | gracely.Error>;
|
|
8
|
+
remove(account: string, id: string): Promise<Account.Charge | gracely.Error>;
|
|
9
|
+
replace(account: string, id: string, charge: Account.Charge.Creatable): Promise<Account.Charge | gracely.Error>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export class Charge {
|
|
2
|
+
client;
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
async create(account, charge) {
|
|
7
|
+
return this.client.post(`/account/${account}/charge`, charge);
|
|
8
|
+
}
|
|
9
|
+
async remove(account, id) {
|
|
10
|
+
return this.client.delete(`/account/${account}/charge/${id}`);
|
|
11
|
+
}
|
|
12
|
+
async replace(account, id, charge) {
|
|
13
|
+
return this.client.put(`/account/${account}/charge/${id}`, charge);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=Charge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Charge.js","sourceRoot":"","sources":["../../../../Client/Accounts/Charge.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,MAAM;IACW;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,MAAgC;QAC7D,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAiB,YAAY,OAAO,SAAS,EAAE,MAAM,CAAC,CAAA;IAC9E,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,EAAU;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAiB,YAAY,OAAO,WAAW,EAAE,EAAE,CAAC,CAAA;IAC9E,CAAC;IACD,KAAK,CAAC,OAAO,CACZ,OAAe,EACf,EAAU,EACV,MAAgC;QAEhC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAiB,YAAY,OAAO,WAAW,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;IACnF,CAAC;CACD"}
|
|
@@ -2,6 +2,7 @@ import { gracely } from "gracely";
|
|
|
2
2
|
import { http } from "cloudly-http";
|
|
3
3
|
import { Account } from "../../Account";
|
|
4
4
|
import { Buffer } from "./Buffer";
|
|
5
|
+
import { Charge } from "./Charge";
|
|
5
6
|
import { Counterparts } from "./Counterparts";
|
|
6
7
|
import { Details } from "./Details";
|
|
7
8
|
import { History } from "./History";
|
|
@@ -10,6 +11,7 @@ import { Status } from "./Status";
|
|
|
10
11
|
export declare class Accounts {
|
|
11
12
|
private readonly client;
|
|
12
13
|
readonly buffer: Buffer;
|
|
14
|
+
readonly charge: Charge;
|
|
13
15
|
readonly details: Details;
|
|
14
16
|
readonly rules: Rules;
|
|
15
17
|
readonly status: Status;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Buffer } from "./Buffer";
|
|
2
|
+
import { Charge } from "./Charge";
|
|
2
3
|
import { Counterparts } from "./Counterparts";
|
|
3
4
|
import { Details } from "./Details";
|
|
4
5
|
import { History } from "./History";
|
|
@@ -7,6 +8,7 @@ import { Status } from "./Status";
|
|
|
7
8
|
export class Accounts {
|
|
8
9
|
client;
|
|
9
10
|
buffer;
|
|
11
|
+
charge;
|
|
10
12
|
details;
|
|
11
13
|
rules;
|
|
12
14
|
status;
|
|
@@ -15,6 +17,7 @@ export class Accounts {
|
|
|
15
17
|
constructor(client) {
|
|
16
18
|
this.client = client;
|
|
17
19
|
this.buffer = new Buffer(this.client);
|
|
20
|
+
this.charge = new Charge(this.client);
|
|
18
21
|
this.details = new Details(this.client);
|
|
19
22
|
this.rules = new Rules(this.client);
|
|
20
23
|
this.status = new Status(this.client);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Accounts/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE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