@accon/connect 0.9.1 → 0.10.1
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/order/menew/dto/create-order.dto.d.ts +50 -0
- package/dist/order/menew/dto/create-order.dto.js +25 -0
- package/dist/order/menew/dto/create-order.dto.js.map +1 -0
- package/dist/order/menew/dto/get-token.dto.d.ts +8 -0
- package/dist/order/menew/dto/get-token.dto.js +13 -0
- package/dist/order/menew/dto/get-token.dto.js.map +1 -0
- package/dist/order/menew/menew.config.d.ts +15 -0
- package/dist/order/menew/menew.config.js +17 -0
- package/dist/order/menew/menew.config.js.map +1 -0
- package/dist/order/menew/menew.order-output.d.ts +21 -0
- package/dist/order/menew/menew.order-output.js +202 -0
- package/dist/order/menew/menew.order-output.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare class ItensDto {
|
|
2
|
+
codigo_produto: string;
|
|
3
|
+
observacao: string;
|
|
4
|
+
valor: number;
|
|
5
|
+
desconto: number;
|
|
6
|
+
qnt: number;
|
|
7
|
+
total: number;
|
|
8
|
+
itens_montagem: {
|
|
9
|
+
codigo_produto: string;
|
|
10
|
+
observacao: string;
|
|
11
|
+
valor: number;
|
|
12
|
+
qnt: number;
|
|
13
|
+
desconto: number;
|
|
14
|
+
total: number;
|
|
15
|
+
}[];
|
|
16
|
+
}
|
|
17
|
+
export declare class PagamentoDto {
|
|
18
|
+
valor: number;
|
|
19
|
+
forma: string;
|
|
20
|
+
forma_nome: string;
|
|
21
|
+
}
|
|
22
|
+
export declare class CreateOrderDto {
|
|
23
|
+
token: string;
|
|
24
|
+
requests: {
|
|
25
|
+
jsonrpc: string;
|
|
26
|
+
method: string;
|
|
27
|
+
params: {
|
|
28
|
+
estabelecimento_id: string;
|
|
29
|
+
cliente_fone: string;
|
|
30
|
+
cliente_nome: string;
|
|
31
|
+
valor_produtos: number;
|
|
32
|
+
valor_total: number;
|
|
33
|
+
valor_desconto: number;
|
|
34
|
+
valor_taxa: number;
|
|
35
|
+
fullservice: string;
|
|
36
|
+
entrega_estado: string;
|
|
37
|
+
entrega_cidade: string;
|
|
38
|
+
entrega_bairronome: string;
|
|
39
|
+
entrega_cep: string;
|
|
40
|
+
entrega_logradouro: string;
|
|
41
|
+
entrega_numero: string;
|
|
42
|
+
entrega_complemento: string;
|
|
43
|
+
entrega_referencia: string;
|
|
44
|
+
entrega_noestabelecimento: number;
|
|
45
|
+
itens: Array<ItensDto>;
|
|
46
|
+
pagamento: PagamentoDto;
|
|
47
|
+
};
|
|
48
|
+
id: string;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateOrderDto = exports.PagamentoDto = exports.ItensDto = void 0;
|
|
4
|
+
class ItensDto {
|
|
5
|
+
codigo_produto;
|
|
6
|
+
observacao;
|
|
7
|
+
valor;
|
|
8
|
+
desconto;
|
|
9
|
+
qnt;
|
|
10
|
+
total;
|
|
11
|
+
itens_montagem;
|
|
12
|
+
}
|
|
13
|
+
exports.ItensDto = ItensDto;
|
|
14
|
+
class PagamentoDto {
|
|
15
|
+
valor;
|
|
16
|
+
forma;
|
|
17
|
+
forma_nome;
|
|
18
|
+
}
|
|
19
|
+
exports.PagamentoDto = PagamentoDto;
|
|
20
|
+
class CreateOrderDto {
|
|
21
|
+
token;
|
|
22
|
+
requests;
|
|
23
|
+
}
|
|
24
|
+
exports.CreateOrderDto = CreateOrderDto;
|
|
25
|
+
//# sourceMappingURL=create-order.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-order.dto.js","sourceRoot":"","sources":["../../../../lib/order/menew/dto/create-order.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,QAAQ;IACnB,cAAc,CAAS;IACvB,UAAU,CAAS;IACnB,KAAK,CAAS;IACd,QAAQ,CAAS;IACjB,GAAG,CAAS;IACZ,KAAK,CAAS;IACd,cAAc,CAOV;CACL;AAfD,4BAeC;AAED,MAAa,YAAY;IACvB,KAAK,CAAS;IACd,KAAK,CAAS;IACd,UAAU,CAAS;CACpB;AAJD,oCAIC;AAED,MAAa,cAAc;IACzB,KAAK,CAAS;IACd,QAAQ,CAyBN;CACH;AA5BD,wCA4BC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetTokenDto = void 0;
|
|
4
|
+
class GetTokenDto {
|
|
5
|
+
jsonrpc;
|
|
6
|
+
result;
|
|
7
|
+
expires_at;
|
|
8
|
+
expires_in;
|
|
9
|
+
time_remaining;
|
|
10
|
+
id;
|
|
11
|
+
}
|
|
12
|
+
exports.GetTokenDto = GetTokenDto;
|
|
13
|
+
//# sourceMappingURL=get-token.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-token.dto.js","sourceRoot":"","sources":["../../../../lib/order/menew/dto/get-token.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,WAAW;IACtB,OAAO,CAAS;IAChB,MAAM,CAAS;IACf,UAAU,CAAS;IACnB,UAAU,CAAS;IACnB,cAAc,CAAS;IACvB,EAAE,CAAS;CACZ;AAPD,kCAOC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FromSchema } from 'json-schema-to-ts';
|
|
2
|
+
export declare const MENEW_CONFIG_SCHEMA: {
|
|
3
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
4
|
+
readonly title: "Menew Configuration";
|
|
5
|
+
readonly type: "object";
|
|
6
|
+
readonly properties: {
|
|
7
|
+
readonly ESTABLISHMENT_ID: {
|
|
8
|
+
readonly type: "string";
|
|
9
|
+
readonly title: "ID estabelecimento";
|
|
10
|
+
readonly description: "ID do estabelecimento fornecido pelo Menew";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
readonly required: readonly ["ESTABLISHMENT_ID"];
|
|
14
|
+
};
|
|
15
|
+
export type MenewConfig = FromSchema<typeof MENEW_CONFIG_SCHEMA>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MENEW_CONFIG_SCHEMA = void 0;
|
|
4
|
+
exports.MENEW_CONFIG_SCHEMA = {
|
|
5
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
6
|
+
title: 'Menew Configuration',
|
|
7
|
+
type: 'object',
|
|
8
|
+
properties: {
|
|
9
|
+
ESTABLISHMENT_ID: {
|
|
10
|
+
type: 'string',
|
|
11
|
+
title: 'ID estabelecimento',
|
|
12
|
+
description: 'ID do estabelecimento fornecido pelo Menew',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
required: ['ESTABLISHMENT_ID'],
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=menew.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menew.config.js","sourceRoot":"","sources":["../../../lib/order/menew/menew.config.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,GAAG;IACjC,OAAO,EAAE,yCAAyC;IAClD,KAAK,EAAE,qBAAqB;IAC5B,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,gBAAgB,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,4CAA4C;SAC1D;KACF;IACD,QAAQ,EAAE,CAAC,kBAAkB,CAAC;CACD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EventsService, IntegrationPayload, Order, OrderOutputIntegration } from '../../core/index.js';
|
|
2
|
+
import { HttpService } from '@nestjs/axios';
|
|
3
|
+
import { CreateOrderDto, ItensDto, PagamentoDto } from './dto/create-order.dto';
|
|
4
|
+
import { MenewConfig } from './menew.config';
|
|
5
|
+
import { GetTokenDto } from './dto/get-token.dto';
|
|
6
|
+
export declare class MenewOrderOutput implements OrderOutputIntegration<MenewConfig> {
|
|
7
|
+
readonly eventService: EventsService;
|
|
8
|
+
private readonly httpService;
|
|
9
|
+
private readonly logger;
|
|
10
|
+
private readonly MENEW_BASE_URL;
|
|
11
|
+
private readonly MENEW_USER;
|
|
12
|
+
private readonly MENEW_TOKEN?;
|
|
13
|
+
private readonly ALLOWED_ORDER_TYPES;
|
|
14
|
+
private readonly dispatchEvent;
|
|
15
|
+
constructor(eventService: EventsService, httpService: HttpService);
|
|
16
|
+
onOrderCreated(payload: IntegrationPayload, config: MenewConfig): Promise<void>;
|
|
17
|
+
transformItems(order: Order): Array<ItensDto>;
|
|
18
|
+
transformPayment(order: Order): PagamentoDto;
|
|
19
|
+
transformOrder(order: Order, config: MenewConfig, token: string): CreateOrderDto;
|
|
20
|
+
getToken(): Promise<GetTokenDto>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var MenewOrderOutput_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.MenewOrderOutput = void 0;
|
|
14
|
+
const core_1 = require("../../core/index.js");
|
|
15
|
+
const common_1 = require("@nestjs/common");
|
|
16
|
+
const axios_1 = require("@nestjs/axios");
|
|
17
|
+
const axios_2 = require("axios");
|
|
18
|
+
const rxjs_1 = require("rxjs");
|
|
19
|
+
const crypto_1 = require("crypto");
|
|
20
|
+
const menew_config_1 = require("./menew.config");
|
|
21
|
+
let MenewOrderOutput = MenewOrderOutput_1 = class MenewOrderOutput {
|
|
22
|
+
eventService;
|
|
23
|
+
httpService;
|
|
24
|
+
logger = new common_1.Logger(MenewOrderOutput_1.name);
|
|
25
|
+
MENEW_BASE_URL;
|
|
26
|
+
MENEW_USER;
|
|
27
|
+
MENEW_TOKEN;
|
|
28
|
+
ALLOWED_ORDER_TYPES;
|
|
29
|
+
dispatchEvent;
|
|
30
|
+
constructor(eventService, httpService) {
|
|
31
|
+
this.eventService = eventService;
|
|
32
|
+
this.httpService = httpService;
|
|
33
|
+
this.MENEW_BASE_URL =
|
|
34
|
+
process.env.MENEW_BASE_URL || 'https://www.portalmenew.com.br/public-api/';
|
|
35
|
+
this.MENEW_USER = process.env.MENEW_USER || 'accon';
|
|
36
|
+
this.MENEW_TOKEN = process.env.MENEW_TOKEN;
|
|
37
|
+
if (!this.MENEW_TOKEN) {
|
|
38
|
+
this.logger.error('MENEW_TOKEN não está definido nas variáveis de ambiente');
|
|
39
|
+
}
|
|
40
|
+
this.ALLOWED_ORDER_TYPES = ['DELIVERY', 'TAKEOUT'];
|
|
41
|
+
this.dispatchEvent = eventService.createDispatcherFor('Menew', 'OrderOutput');
|
|
42
|
+
}
|
|
43
|
+
async onOrderCreated(payload, config) {
|
|
44
|
+
const { order } = payload;
|
|
45
|
+
const orderId = parseInt(order.externalId);
|
|
46
|
+
this.logger.log(`Processando pedido #${orderId} na Menew`);
|
|
47
|
+
if (!this.ALLOWED_ORDER_TYPES.includes(order.type)) {
|
|
48
|
+
this.logger.verbose(`Ignorando tipo de pedido não permitido: ${order.type} [${this.ALLOWED_ORDER_TYPES.join(',')}]`);
|
|
49
|
+
this.dispatchEvent({
|
|
50
|
+
eventType: 'INTEGRATION_FAILED',
|
|
51
|
+
orderId,
|
|
52
|
+
metadata: {
|
|
53
|
+
error: `Ignorando tipo de pedido não permitido: ${order.type} [${this.ALLOWED_ORDER_TYPES.join(',')}]`,
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
this.dispatchEvent({
|
|
59
|
+
eventType: 'INTEGRATION_INITIATED',
|
|
60
|
+
orderId,
|
|
61
|
+
});
|
|
62
|
+
try {
|
|
63
|
+
const token = (await this.getToken())?.result;
|
|
64
|
+
if (!token) {
|
|
65
|
+
throw new Error('Não foi possível autenticar com a Menew');
|
|
66
|
+
}
|
|
67
|
+
this.logger.debug(`Token recebido da Menew: ${token}`);
|
|
68
|
+
const body = this.transformOrder(order, config, token);
|
|
69
|
+
this.dispatchEvent({
|
|
70
|
+
eventType: 'INTEGRATION_PROCESSING',
|
|
71
|
+
orderId,
|
|
72
|
+
metadata: { request: body },
|
|
73
|
+
});
|
|
74
|
+
this.logger.debug(`Enviando pedido para Menew: ${JSON.stringify(body)}`);
|
|
75
|
+
const { data } = await (0, rxjs_1.firstValueFrom)(this.httpService.post(this.MENEW_BASE_URL, body));
|
|
76
|
+
this.dispatchEvent({
|
|
77
|
+
eventType: 'INTEGRATION_COMPLETED',
|
|
78
|
+
orderId,
|
|
79
|
+
metadata: { response: data },
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
if ((0, axios_2.isAxiosError)(error)) {
|
|
84
|
+
this.logger.error('onOrderCreated: falha ao realizar requisição na Menew', JSON.stringify(error.response?.data));
|
|
85
|
+
this.dispatchEvent({
|
|
86
|
+
eventType: 'INTEGRATION_FAILED',
|
|
87
|
+
orderId,
|
|
88
|
+
metadata: { error: error.response?.data },
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
this.dispatchEvent({
|
|
93
|
+
eventType: 'INTEGRATION_FAILED',
|
|
94
|
+
orderId,
|
|
95
|
+
metadata: { error },
|
|
96
|
+
});
|
|
97
|
+
this.logger.error('onOrderCreated: falha ao criar pedido na Menew', error);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
transformItems(order) {
|
|
102
|
+
const items = order.items.map((item) => ({
|
|
103
|
+
codigo_produto: item.externalCode || item.id,
|
|
104
|
+
observacao: item.specialInstructions || '',
|
|
105
|
+
valor: item.totalPrice.value,
|
|
106
|
+
desconto: 0,
|
|
107
|
+
qnt: item.quantity,
|
|
108
|
+
total: item.totalPrice.value,
|
|
109
|
+
itens_montagem: item.options?.map((itemOption) => ({
|
|
110
|
+
codigo_produto: itemOption.externalCode || itemOption.id,
|
|
111
|
+
observacao: itemOption.specialInstructions || '',
|
|
112
|
+
valor: itemOption.totalPrice.value,
|
|
113
|
+
qnt: itemOption.quantity,
|
|
114
|
+
desconto: 0.0,
|
|
115
|
+
total: itemOption.totalPrice.value,
|
|
116
|
+
})) || [],
|
|
117
|
+
}));
|
|
118
|
+
return items;
|
|
119
|
+
}
|
|
120
|
+
transformPayment(order) {
|
|
121
|
+
return {
|
|
122
|
+
valor: order.payments.methods.reduce((acc, cur) => acc + cur.value, 0),
|
|
123
|
+
forma: order.displayId || '1',
|
|
124
|
+
forma_nome: order.payments.pending === 0
|
|
125
|
+
? `Online - ${order.payments.methods.map((m) => m.method).join(', ')}`
|
|
126
|
+
: order.payments.methods.map((m) => m.method).join(', '),
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
transformOrder(order, config, token) {
|
|
130
|
+
if (!order.customer) {
|
|
131
|
+
throw new core_1.InvalidOrderException('Pedido sem informações do cliente', 'customer');
|
|
132
|
+
}
|
|
133
|
+
if (order.type === 'DELIVERY' && !order.delivery?.deliveryAddress) {
|
|
134
|
+
throw new core_1.InvalidOrderException('Pedido de entrega sem endereço', 'delivery');
|
|
135
|
+
}
|
|
136
|
+
const phone = order.customer?.phone.number.replace(/\D/g, '');
|
|
137
|
+
const deliveryFee = order.otherFees?.find(({ type }) => type === 'DELIVERY_FEE');
|
|
138
|
+
const address = order.delivery?.deliveryAddress;
|
|
139
|
+
const dto = {
|
|
140
|
+
token,
|
|
141
|
+
requests: {
|
|
142
|
+
jsonrpc: '2.0',
|
|
143
|
+
method: 'Pedido/send',
|
|
144
|
+
params: {
|
|
145
|
+
estabelecimento_id: config.ESTABLISHMENT_ID,
|
|
146
|
+
cliente_fone: phone,
|
|
147
|
+
cliente_nome: order.customer.name,
|
|
148
|
+
valor_produtos: order.total.itemsPrice.value,
|
|
149
|
+
valor_total: order.total.orderAmount.value,
|
|
150
|
+
valor_desconto: order.total.discount.value,
|
|
151
|
+
valor_taxa: deliveryFee?.price.value || 0,
|
|
152
|
+
fullservice: 'N',
|
|
153
|
+
entrega_estado: address?.state || '',
|
|
154
|
+
entrega_cidade: address?.city || '',
|
|
155
|
+
entrega_bairronome: address?.district || '',
|
|
156
|
+
entrega_cep: address?.postalCode?.replace(/\D/g, '') || '',
|
|
157
|
+
entrega_logradouro: address?.street || '',
|
|
158
|
+
entrega_numero: address?.number || '',
|
|
159
|
+
entrega_complemento: address?.complement || '',
|
|
160
|
+
entrega_referencia: address?.reference || '',
|
|
161
|
+
entrega_noestabelecimento: order.type === 'DELIVERY' ? 0 : 1,
|
|
162
|
+
itens: this.transformItems(order),
|
|
163
|
+
pagamento: this.transformPayment(order),
|
|
164
|
+
},
|
|
165
|
+
id: order.id,
|
|
166
|
+
},
|
|
167
|
+
};
|
|
168
|
+
return dto;
|
|
169
|
+
}
|
|
170
|
+
async getToken() {
|
|
171
|
+
const { data } = await (0, rxjs_1.firstValueFrom)(this.httpService.post(this.MENEW_BASE_URL, {
|
|
172
|
+
token: null,
|
|
173
|
+
requests: {
|
|
174
|
+
jsonrpc: '2.0',
|
|
175
|
+
method: 'Usuario/login',
|
|
176
|
+
params: {
|
|
177
|
+
usuario: this.MENEW_USER,
|
|
178
|
+
token: this.MENEW_TOKEN,
|
|
179
|
+
},
|
|
180
|
+
id: (0, crypto_1.randomUUID)(),
|
|
181
|
+
},
|
|
182
|
+
}));
|
|
183
|
+
return data;
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
exports.MenewOrderOutput = MenewOrderOutput;
|
|
187
|
+
exports.MenewOrderOutput = MenewOrderOutput = MenewOrderOutput_1 = __decorate([
|
|
188
|
+
(0, core_1.RegistryIntegration)({
|
|
189
|
+
id: 'menew',
|
|
190
|
+
category: 'POS',
|
|
191
|
+
type: 'OrderOutput',
|
|
192
|
+
title: 'Menew',
|
|
193
|
+
description: 'Menew, Sistema para gestão de restaurantes.',
|
|
194
|
+
logoUrl: 'https://raichu-uploads.s3.amazonaws.com/logo_menew_LlqUvW.png',
|
|
195
|
+
websiteUrl: 'https://www.menew.com.br',
|
|
196
|
+
configSchema: menew_config_1.MENEW_CONFIG_SCHEMA,
|
|
197
|
+
}),
|
|
198
|
+
(0, common_1.Injectable)(),
|
|
199
|
+
__metadata("design:paramtypes", [core_1.EventsService,
|
|
200
|
+
axios_1.HttpService])
|
|
201
|
+
], MenewOrderOutput);
|
|
202
|
+
//# sourceMappingURL=menew.order-output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menew.order-output.js","sourceRoot":"","sources":["../../../lib/order/menew/menew.order-output.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oCAQmB;AAEnB,2CAAoD;AACpD,yCAA4C;AAC5C,iCAAqC;AAIrC,+BAAsC;AACtC,mCAAoC;AAEpC,iDAAkE;AAc3D,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAShB;IACQ;IATF,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAgB,CAAC,IAAI,CAAC,CAAC;IAC3C,cAAc,CAAS;IACvB,UAAU,CAAS;IACnB,WAAW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