simpo-component-library 2.0.17 → 2.0.19
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/lib/ecommerce/sections/cart/cart.component.mjs +46 -2
- package/esm2022/lib/ecommerce/sections/featured-products/featured-products.component.mjs +78 -56
- package/esm2022/lib/sections/navbar-section/navbar-section.component.mjs +2 -2
- package/esm2022/lib/services/cart.service.mjs +65 -4
- package/esm2022/lib/services/storage.service.mjs +11 -12
- package/fesm2022/simpo-component-library.mjs +195 -71
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/directive/background-directive.d.ts +1 -1
- package/lib/directive/button-directive.directive.d.ts +1 -1
- package/lib/directive/color.directive.d.ts +1 -1
- package/lib/ecommerce/sections/cart/cart.component.d.ts +1 -0
- package/lib/sections/pricing-section/pricing-section.component.d.ts +1 -1
- package/lib/services/cart.service.d.ts +7 -2
- package/lib/services/storage.service.d.ts +4 -2
- package/package.json +1 -1
- package/simpo-component-library-2.0.19.tgz +0 -0
- package/simpo-component-library-2.0.17.tgz +0 -0
@@ -3,10 +3,12 @@ import { OrderedItems } from '../ecommerce/styles/OrderedItems.modal';
|
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
import * as i1 from "./storage.service";
|
5
5
|
import * as i2 from "./rest.service";
|
6
|
+
import * as i3 from "primeng/api";
|
6
7
|
export class CartService {
|
7
|
-
constructor(storageService, restService) {
|
8
|
+
constructor(storageService, restService, messageService) {
|
8
9
|
this.storageService = storageService;
|
9
10
|
this.restService = restService;
|
11
|
+
this.messageService = messageService;
|
10
12
|
}
|
11
13
|
addItemFromCartPage(product, userCart) {
|
12
14
|
if (product.quantity) {
|
@@ -82,6 +84,65 @@ export class CartService {
|
|
82
84
|
clearCartItems() {
|
83
85
|
this.storageService.clearUserCart();
|
84
86
|
}
|
87
|
+
addItemToLocalCart(product, type) {
|
88
|
+
if (this.isItemOutOfStock(product)) {
|
89
|
+
this.messageService.add({ severity: 'warn', summary: 'Cart', detail: 'Item is not available as of now. We will notify you once available' });
|
90
|
+
return;
|
91
|
+
}
|
92
|
+
if (!product?.quantity)
|
93
|
+
product.quantity = 0;
|
94
|
+
if (type == 'ADD') {
|
95
|
+
product.quantity += 1;
|
96
|
+
}
|
97
|
+
else {
|
98
|
+
product.quantity -= 1;
|
99
|
+
}
|
100
|
+
this.storageService.getUserCart().then((cartResponse) => {
|
101
|
+
cartResponse.onsuccess = (cartData) => {
|
102
|
+
const userCart = cartData.target.result ?? [];
|
103
|
+
let orderedItem = new OrderedItems();
|
104
|
+
if (product?.itemVariant?.length) {
|
105
|
+
const itemVarient = this.getItemVarient(product, product.varientId);
|
106
|
+
if (itemVarient) {
|
107
|
+
itemVarient.quantity = product.quantity;
|
108
|
+
orderedItem = this.objectMapper(product, itemVarient.variantId);
|
109
|
+
}
|
110
|
+
}
|
111
|
+
else {
|
112
|
+
orderedItem = this.objectMapper(product);
|
113
|
+
}
|
114
|
+
let productFound = false;
|
115
|
+
for (let localProduct of userCart) {
|
116
|
+
if (localProduct.varientId === product.varientId) {
|
117
|
+
localProduct.quantity = type === 'ADD' ? localProduct.quantity + 1 : localProduct.quantity - 1;
|
118
|
+
if (localProduct.quantity == 0) {
|
119
|
+
this.removeItemFromCart(localProduct);
|
120
|
+
}
|
121
|
+
else {
|
122
|
+
this.storageService.addProductToCart(localProduct);
|
123
|
+
}
|
124
|
+
productFound = true;
|
125
|
+
break;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
if (!productFound) {
|
129
|
+
orderedItem.quantity = type === 'ADD' ? 1 : -1;
|
130
|
+
this.storageService.addProductToCart(orderedItem);
|
131
|
+
}
|
132
|
+
};
|
133
|
+
});
|
134
|
+
}
|
135
|
+
isItemOutOfStock(product) {
|
136
|
+
return product.itemInventory?.openingStock == 0;
|
137
|
+
}
|
138
|
+
getItemVarient(product, varientId) {
|
139
|
+
let selectedVarient = null;
|
140
|
+
product?.itemVariant?.forEach((varient) => {
|
141
|
+
if (varient.variantId == varientId)
|
142
|
+
selectedVarient = varient;
|
143
|
+
});
|
144
|
+
return selectedVarient;
|
145
|
+
}
|
85
146
|
storeDataToServer() {
|
86
147
|
// const userCart = UserCart as never as Cart;
|
87
148
|
// const userWishlist = UserFavourites as never as Cart;
|
@@ -94,7 +155,7 @@ export class CartService {
|
|
94
155
|
// this.restService.addItemToDB(UserFavourites)
|
95
156
|
// ]);
|
96
157
|
}
|
97
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartService, deps: [{ token: i1.StorageServiceService }, { token: i2.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
158
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartService, deps: [{ token: i1.StorageServiceService }, { token: i2.RestService }, { token: i3.MessageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
98
159
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartService, providedIn: 'root' }); }
|
99
160
|
}
|
100
161
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartService, decorators: [{
|
@@ -102,5 +163,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
102
163
|
args: [{
|
103
164
|
providedIn: 'root',
|
104
165
|
}]
|
105
|
-
}], ctorParameters: () => [{ type: i1.StorageServiceService }, { type: i2.RestService }] });
|
106
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FydC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2ltcG8tdWkvc3JjL2xpYi9zZXJ2aWNlcy9jYXJ0LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFnQixVQ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YXJpYW50SWQ/OiBzdHJpbmcpOiBPcmRlcmVkSXRlbXMge1xyXG4gICAgcmV0dXJuIG5ldyBPcmRlcmVkSXRlbXMocHJvZHVjdCwgdmFyaWFudElkKTtcclxuICB9XHJcblxyXG4gIHB1YmxpYyBzdG9yZUNhcnREYXRhVG9TZXJ2ZXIoY2FydDogQ2FydCkge1xyXG4gICAgXHJcbiAgfVxyXG4gIHB1YmxpYyBjbGVhckNhcnRJdGVtcygpIHtcclxuICAgIHRoaXMuc3RvcmFnZVNlcnZpY2UuY2xlYXJVc2VyQ2FydCgpO1xyXG4gIH1cclxuXHJcbiAgcHVibGljIHN0b3JlRGF0YVRvU2VydmVyKCkge1xyXG4gICAgLy8gY29uc3QgdXNlckNhcnQgPSBVc2VyQ2FydCBhcyBuZXZlciBhcyBDYXJ0O1xyXG4gICAgLy8gY29uc3QgdXNlcldpc2hsaXN0ID0gVXNlckZhdm91cml0ZXMgYXMgbmV2ZXIgYXMgQ2FydDtcclxuICAgIC8vIGlmICh1c2VyQ2FydC5jYXJ0SWQ/Lmxlbmd0aCA9PSAwKVxyXG4gICAgLy8gICBkZWxldGUgdXNlckNhcnQuY2FydElkO1xyXG4gICAgLy8gaWYgKHVzZXJXaXNobGlzdC5jYXJ0SWQ/Lmxlbmd0aCA9PSAwKVxyXG4gICAgLy8gICBkZWxldGUgdXNlcldpc2hsaXN0LmNhcnRJZDtcclxuXHJcbiAgICAvLyByZXR1cm4gZm9ya0pvaW4oW1xyXG4gICAgLy8gICB0aGlzLnJlc3RTZXJ2aWNlLmFkZEl0ZW1Ub0RCKFVzZXJDYXJ0KSxcclxuICAgIC8vICAgdGhpcy5yZXN0U2VydmljZS5hZGRJdGVtVG9EQihVc2VyRmF2b3VyaXRlcylcclxuICAgIC8vIF0pO1xyXG4gIH1cclxufSJdfQ==
|
166
|
+
}], ctorParameters: () => [{ type: i1.StorageServiceService }, { type: i2.RestService }, { type: i3.MessageService }] });
|
167
|
+
//# sourceMappingURL=data:application/json;base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bnQgfCBudWxsID0gbnVsbDtcclxuICAgIHByb2R1Y3Q/Lml0ZW1WYXJpYW50Py5mb3JFYWNoKCh2YXJpZW50OiBJdGVtVmFyaWFudCkgPT4ge1xyXG4gICAgICBpZiAodmFyaWVudC52YXJpYW50SWQgPT0gdmFyaWVudElkKVxyXG4gICAgICAgIHNlbGVjdGVkVmFyaWVudCA9IHZhcmllbnQ7XHJcbiAgICB9KVxyXG5cclxuICAgIHJldHVybiBzZWxlY3RlZFZhcmllbnQ7XHJcbiAgfVxyXG5cclxuICBwdWJsaWMgc3RvcmVEYXRhVG9TZXJ2ZXIoKSB7XHJcbiAgICAvLyBjb25zdCB1c2VyQ2FydCA9IFVzZXJDYXJ0IGFzIG5ldmVyIGFzIENhcnQ7XHJcbiAgICAvLyBjb25zdCB1c2VyV2lzaGxpc3QgPSBVc2VyRmF2b3VyaXRlcyBhcyBuZXZlciBhcyBDYXJ0O1xyXG4gICAgLy8gaWYgKHVzZXJDYXJ0LmNhcnRJZD8ubGVuZ3RoID09IDApXHJcbiAgICAvLyAgIGRlbGV0ZSB1c2VyQ2FydC5jYXJ0SWQ7XHJcbiAgICAvLyBpZiAodXNlcldpc2hsaXN0LmNhcnRJZD8ubGVuZ3RoID09IDApXHJcbiAgICAvLyAgIGRlbGV0ZSB1c2VyV2lzaGxpc3QuY2FydElkO1xyXG5cclxuICAgIC8vIHJldHVybiBmb3JrSm9pbihbXHJcbiAgICAvLyAgIHRoaXMucmVzdFNlcnZpY2UuYWRkSXRlbVRvREIoVXNlckNhcnQpLFxyXG4gICAgLy8gICB0aGlzLnJlc3RTZXJ2aWNlLmFkZEl0ZW1Ub0RCKFVzZXJGYXZvdXJpdGVzKVxyXG4gICAgLy8gXSk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
@@ -6,12 +6,14 @@ import * as i1 from "./events.service";
|
|
6
6
|
import * as i2 from "ngx-cookie-service";
|
7
7
|
import * as i3 from "./rest.service";
|
8
8
|
import * as i4 from "@angular/router";
|
9
|
+
import * as i5 from "primeng/api";
|
9
10
|
export class StorageServiceService {
|
10
|
-
constructor(eventService, cookieService, restService, router) {
|
11
|
+
constructor(eventService, cookieService, restService, router, messageService) {
|
11
12
|
this.eventService = eventService;
|
12
13
|
this.cookieService = cookieService;
|
13
14
|
this.restService = restService;
|
14
15
|
this.router = router;
|
16
|
+
this.messageService = messageService;
|
15
17
|
this.totalCartItems = 0;
|
16
18
|
this.databaseName = "USER";
|
17
19
|
this.databaseVersion = 1;
|
@@ -100,11 +102,6 @@ export class StorageServiceService {
|
|
100
102
|
if (this.router.url.includes('cart'))
|
101
103
|
return;
|
102
104
|
const userDetails = this.getUser();
|
103
|
-
this.getCartProduct(userDetails?.userId).then((products) => {
|
104
|
-
console.log("Merged products:", products);
|
105
|
-
}).catch((error) => {
|
106
|
-
console.error("Error:", error);
|
107
|
-
});
|
108
105
|
if (!!userDetails) {
|
109
106
|
this.eventService.showLoadingScreen.emit(true);
|
110
107
|
const request = forkJoin([
|
@@ -164,15 +161,17 @@ export class StorageServiceService {
|
|
164
161
|
const transaction = this.database.transaction(this.cartCollectionName, "readwrite");
|
165
162
|
return await transaction.objectStore(this.cartCollectionName).getAll();
|
166
163
|
}
|
167
|
-
async getCartProduct(
|
164
|
+
async getCartProduct() {
|
168
165
|
try {
|
169
166
|
const cartResponse = await this.getUserCart();
|
170
167
|
return new Promise((resolve, reject) => {
|
171
168
|
cartResponse.onsuccess = async (cartData) => {
|
172
169
|
const indexDBProduct = cartData.target.result;
|
173
|
-
|
170
|
+
const userDetails = this.getUser();
|
171
|
+
if (userDetails?.userId) {
|
174
172
|
try {
|
175
|
-
const response = await this.restService.getUserItems(userId, "CART").toPromise();
|
173
|
+
const response = await this.restService.getUserItems(userDetails?.userId, "CART").toPromise();
|
174
|
+
localStorage.setItem('cartId', response.data?.[0]?.cartId);
|
176
175
|
const serverDBProduct = response?.data?.[0]?.orderedItems ?? [];
|
177
176
|
for (let localProduct of indexDBProduct) {
|
178
177
|
let productFound = false;
|
@@ -285,7 +284,7 @@ export class StorageServiceService {
|
|
285
284
|
storePaymentFor(paymentFor) {
|
286
285
|
this.cookieService.set("paymentFor", paymentFor, 7);
|
287
286
|
}
|
288
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: StorageServiceService, deps: [{ token: i1.EventsService }, { token: i2.CookieService }, { token: i3.RestService }, { token: i4.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
287
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: StorageServiceService, deps: [{ token: i1.EventsService }, { token: i2.CookieService }, { token: i3.RestService }, { token: i4.Router }, { token: i5.MessageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
289
288
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: StorageServiceService, providedIn: 'root' }); }
|
290
289
|
}
|
291
290
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: StorageServiceService, decorators: [{
|
@@ -293,5 +292,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
293
292
|
args: [{
|
294
293
|
providedIn: 'root'
|
295
294
|
}]
|
296
|
-
}], ctorParameters: () => [{ type: i1.EventsService }, { type: i2.CookieService }, { type: i3.RestService }, { type: i4.Router }] });
|
297
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmFnZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2ltcG8tdWkvc3JjL2xpYi9zZXJ2aWNlcy9zdG9yYWdlLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUF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CA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmICghcHJvZHVjdEZvdW5kKSB7XHJcbiAgICAgICAgICAgICAgICAgIHNlcnZlckRCUHJvZHVjdC5wdXNoKGxvY2FsUHJvZHVjdCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICByZXNvbHZlKHNlcnZlckRCUHJvZHVjdCk7XHJcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XHJcbiAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihcIkVycm9yIGluIEFQSSBjYWxsOlwiLCBlcnJvcik7XHJcbiAgICAgICAgICAgICAgcmVqZWN0KGVycm9yKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgcmVzb2x2ZShpbmRleERCUHJvZHVjdCk7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuICAgICAgfSk7XHJcbiAgICB9IGNhdGNoIChlcnJvcikge1xyXG4gICAgICBjb25zb2xlLmVycm9yKFwiRXJyb3IgcmV0cmlldmluZyBjYXJ0OlwiLCBlcnJvcik7XHJcbiAgICAgIHRocm93IGVycm9yO1xyXG4gICAgfVxyXG4gIH1cclxuXHJcblxyXG4gIGFkZFByb2R1Y3RUb0NhcnQocHJvZHVjdDogT3JkZXJlZEl0ZW1zKSB7XHJcblxyXG4gICAgY29uc3QgdHJhbnNhY3Rpb24gPSB0aGlzLmRhdGFiYXNlLnRyYW5zYWN0aW9uKHRoaXMuY2FydENvbGxlY3Rpb25OYW1lLCBcInJlYWR3cml0ZVwiKTtcclxuICAgIGNvbnN0IHJlc3BvbnNlID0gdHJhbnNhY3Rpb24ub2JqZWN0U3RvcmUodGhpcy5jYXJ0Q29sbGVjdGlvbk5hbWUpLmdldChwcm9kdWN0LnZhcmllbnR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YXJnZXQucmVzdWx0KSB7XHJcbiAgLy8gICAgICAgICAgIHJlc29sdmUoZXZlbnQucmVzdWx0KTtcclxuICAvLyAgICAgICAgIH0gZWxzZSB7XHJcbiAgLy8gICAgICAgICAgIHJlc29sdmUoJ1NVQ0NFU1MnKTtcclxuICAvLyAgICAgICAgIH1cclxuICAvLyAgICAgICB9O1xyXG4gIC8vICAgICAgIHJlcXVlc3Qub25lcnJvciA9IGF3YWl0IGZ1bmN0aW9uIChfZXZlbnQpIHtcclxuICAvLyAgICAgICAgIHJlamVjdChcIk5vIGRhdGFcIik7XHJcbiAgLy8gICAgICAgfVxyXG4gIC8vICAgICB9XHJcbiAgLy8gICB9KTtcclxuICAvLyB9XHJcbn1cclxuIl19
|
295
|
+
}], ctorParameters: () => [{ type: i1.EventsService }, { type: i2.CookieService }, { type: i3.RestService }, { type: i4.Router }, { type: i5.MessageService }] });
|
296
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmFnZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2ltcG8tdWkvc3JjL2xpYi9zZXJ2aWNlcy9zdG9yYWdlLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBVSxNQUFNLGVBQWUsQ0FBQztBQUtuRCxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBRWhDLE9BQU8sRUFBRSxJQUFJLEVBQUUsUUFBUSxFQUFFLE1BQU0sa0NBQWtDLENBQUM7Ozs7Ozs7QUFRbEUsTUFBTSxPQUFPLHFCQUFxQjtJQUVoQyxZQUNtQixZQUEyQixFQUMzQixhQUE0QixFQUM1QixXQUF3QixFQUNqQyxNQUFlLEVBQ04sY0FBOEI7UUFKOUIsaUJBQVksR0FBWixZQUFZ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RyeSB7XHJcbiAgICAgICAgICAgICAgY29uc3QgcmVzcG9uc2U6IGFueSA9IGF3YWl0IHRoaXMucmVzdFNlcnZpY2UuZ2V0VXNlckl0ZW1zKHVzZXJEZXRhaWxzPy51c2VySWQsIFwiQ0FSVFwiKS50b1Byb21pc2UoKTtcclxuICAgICAgICAgICAgICBsb2NhbFN0b3JhZ2Uuc2V0SXRlbSgnY2FydElkJywgcmVzcG9uc2UuZGF0YT8uWzBdPy5jYXJ0SWQpO1xyXG5cclxuICAgICAgICAgICAgICBjb25zdCBzZXJ2ZXJEQlByb2R1Y3QgPSByZXNwb25zZT8uZGF0YT8uWzBdPy5vcmRlcmVkSXRlbXMgPz8gW107XHJcblxyXG4gICAgICAgICAgICAgIGZvciAobGV0IGxvY2FsUHJvZHVjdCBvZiBpbmRleERCUHJvZHVjdCkge1xyXG4gICAgICAgICAgICAgICAgbGV0IHByb2R1Y3RGb3VuZCA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgc2VydmVyUHJvZHVjdCBvZiBzZXJ2ZXJEQlByb2R1Y3QpIHtcclxuICAgICAgICAgICAgICAgICAgaWYgKHNlcnZlclByb2R1Y3QudmFyaWVudElkID09PSBsb2NhbFByb2R1Y3QudmFyaWVudElkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VydmVyUHJvZHVjdC5xdWFudGl0eSArPSBsb2NhbFByb2R1Y3QucXVhbnRpdHk7XHJcbiAgICAgICAgICAgICAgICAgICAgcHJvZHVjdEZvdW5kID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKCFwcm9kdWN0Rm91bmQpIHtcclxuICAgICAgICAgICAgICAgICAgc2VydmVyREJQcm9kdWN0LnB1c2gobG9jYWxQcm9kdWN0KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgI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