@infrab4a/connect-angular 3.3.3-beta.2 → 3.4.0-beta.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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@angular/fire/auth'), require('@infrab4a/connect'), require('js-cookie'), require('ts-custom-error'), require('@angular/fire/firestore'), require('@angular/fire')) :
3
- typeof define === 'function' && define.amd ? define('@infrab4a/connect-angular', ['exports', '@angular/core', 'rxjs', 'rxjs/operators', '@angular/fire/auth', '@infrab4a/connect', 'js-cookie', 'ts-custom-error', '@angular/fire/firestore', '@angular/fire'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.infrab4a = global.infrab4a || {}, global.infrab4a["connect-angular"] = {}), global.ng.core, global.rxjs, global.rxjs.operators, global.ng.fire.auth, global["@infrab4a/connect"], global["js-cookie"], global["ts-custom-error"], global.ng.fire.firestore, global.ng.fire));
5
- })(this, (function (exports, i0, rxjs, operators, i1, i2, cookie, tsCustomError, i1$1, fire) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@angular/fire/auth'), require('@infrab4a/connect'), require('js-cookie'), require('ts-custom-error'), require('@angular/fire/firestore'), require('@angular/common/http'), require('@angular/fire')) :
3
+ typeof define === 'function' && define.amd ? define('@infrab4a/connect-angular', ['exports', '@angular/core', 'rxjs', 'rxjs/operators', '@angular/fire/auth', '@infrab4a/connect', 'js-cookie', 'ts-custom-error', '@angular/fire/firestore', '@angular/common/http', '@angular/fire'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.infrab4a = global.infrab4a || {}, global.infrab4a["connect-angular"] = {}), global.ng.core, global.rxjs, global.rxjs.operators, global.ng.fire.auth, global["@infrab4a/connect"], global["js-cookie"], global["ts-custom-error"], global.ng.fire.firestore, global.ng.common.http, global.ng.fire));
5
+ })(this, (function (exports, i0, rxjs, operators, i1, i1$1, cookie, tsCustomError, i1$2, i1$3, fire) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -26,9 +26,10 @@
26
26
 
27
27
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
28
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
30
- var cookie__default = /*#__PURE__*/_interopDefaultLegacy(cookie);
31
29
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
30
+ var cookie__default = /*#__PURE__*/_interopDefaultLegacy(cookie);
31
+ var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
32
+ var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
32
33
 
33
34
  /*! *****************************************************************************
34
35
  Copyright (c) Microsoft Corporation.
@@ -389,6 +390,8 @@
389
390
  }] }];
390
391
  } });
391
392
 
393
+ var API_URL = 'API_URL';
394
+
392
395
  var DEFAULT_SHOP = 'DEFAULT_SHOP';
393
396
 
394
397
  var ES_CONFIG = 'ES_CONFIG';
@@ -427,7 +430,7 @@
427
430
  this.separateValidCoupons = function (coupons, userEmail) { return coupons
428
431
  .map(function (coupon) {
429
432
  try {
430
- if (!(coupon instanceof i2.Coupon))
433
+ if (!(coupon instanceof i1$1.Coupon))
431
434
  throw new InvalidCouponError('Cupom inválido.');
432
435
  if (_this.isValidCoupon(coupon, userEmail))
433
436
  return coupon;
@@ -436,7 +439,7 @@
436
439
  return error;
437
440
  }
438
441
  })
439
- .reduce(function (current, coupon) { return (Object.assign(Object.assign({}, current), (coupon instanceof i2.Coupon
442
+ .reduce(function (current, coupon) { return (Object.assign(Object.assign({}, current), (coupon instanceof i1$1.Coupon
440
443
  ? { valids: __spreadArray(__spreadArray([], __read(current.valids)), [coupon]) }
441
444
  : { invalids: __spreadArray(__spreadArray([], __read(current.invalids)), [coupon]) }))); }, {
442
445
  valids: [],
@@ -447,8 +450,8 @@
447
450
  var _this = this;
448
451
  return rxjs.from(this.couponRepository.find({
449
452
  filters: {
450
- nickname: { operator: i2.Where.EQUALS, value: nickname },
451
- active: { operator: i2.Where.EQUALS, value: true },
453
+ nickname: { operator: i1$1.Where.EQUALS, value: nickname },
454
+ active: { operator: i1$1.Where.EQUALS, value: true },
452
455
  },
453
456
  })).pipe(operators.concatMap(function (coupons) { return _this.checkCouponRules(coupons, checkoutType, plan, checkout, isSubscription); }), operators.concatMap(function (coupon) { return _this.checkCouponUseAndLimit(coupon, userEmail, checkout); }), operators.map(function (coupon) { return _this.isValidCoupon(coupon, userEmail); }), operators.map(function (coupon) { return coupon; }));
454
457
  };
@@ -460,17 +463,17 @@
460
463
  // Get Primeiro Cupom (o find do repository retorna um array)
461
464
  var coupon = coupons.data.shift();
462
465
  // Verifica se o cupom é aplicavel na loja
463
- var isInShop = coupon.shopAvailability === i2.Shops.ALL || coupon.shopAvailability === this.defaultShop;
466
+ var isInShop = coupon.shopAvailability === i1$1.Shops.ALL || coupon.shopAvailability === this.defaultShop;
464
467
  // Cupon não aplicavel a loja retorna erro
465
468
  if (!isInShop)
466
469
  return rxjs.throwError('Cupom inválido para loja.');
467
470
  // Verifica se o coupon é aplicado no checkout que está sendo realizado
468
- var isCheckoutType = coupon.checkoutType === i2.CheckoutTypes.ALL || coupon.checkoutType === checkoutType;
471
+ var isCheckoutType = coupon.checkoutType === i1$1.CheckoutTypes.ALL || coupon.checkoutType === checkoutType;
469
472
  // Cupon não aplicavel ao checkout retorna erro
470
473
  if (!isCheckoutType)
471
474
  return rxjs.throwError('Cupom inválido. Erro de checkout.');
472
475
  // Verifica se o cupom é ou pode ser aplicado para subscription
473
- if (checkoutType === i2.CheckoutTypes.ALL || checkoutType === i2.CheckoutTypes.SUBSCRIPTION) {
476
+ if (checkoutType === i1$1.CheckoutTypes.ALL || checkoutType === i1$1.CheckoutTypes.SUBSCRIPTION) {
474
477
  // Se o cupom tiver um plano associado, verifica se é o mesmo plano do checkout da assinatura
475
478
  if (coupon.plan && coupon.plan.toUpperCase() !== plan.toUpperCase())
476
479
  return rxjs.throwError('Cupom inválido para sua assinatura.');
@@ -531,9 +534,9 @@
531
534
  CouponService.prototype.calcDiscountSubscription = function (coupon, checkout) {
532
535
  //
533
536
  var discount = 0;
534
- if (coupon.type === i2.CouponTypes.ABSOLUTE)
537
+ if (coupon.type === i1$1.CouponTypes.ABSOLUTE)
535
538
  discount = coupon.discount;
536
- else if (coupon.type === i2.CouponTypes.PERCENTAGE)
539
+ else if (coupon.type === i1$1.CouponTypes.PERCENTAGE)
537
540
  discount = checkout.subscriptionPlan.recurrencePrice * (coupon.discount / 100);
538
541
  return rxjs.of(discount);
539
542
  };
@@ -546,8 +549,8 @@
546
549
  discount = 0;
547
550
  _d = coupon.type;
548
551
  switch (_d) {
549
- case i2.CouponTypes.ABSOLUTE: return [3 /*break*/, 1];
550
- case i2.CouponTypes.PERCENTAGE: return [3 /*break*/, 2];
552
+ case i1$1.CouponTypes.ABSOLUTE: return [3 /*break*/, 1];
553
+ case i1$1.CouponTypes.PERCENTAGE: return [3 /*break*/, 2];
551
554
  }
552
555
  return [3 /*break*/, 4];
553
556
  case 1:
@@ -648,33 +651,33 @@
648
651
  switch (_d.label) {
649
652
  case 0:
650
653
  // Verifica se o email do usuário é coorporativo
651
- if (!this.emailIsFromCollaborator(userEmail) && coupon.exclusivityType === i2.Exclusivities.COLLABORATORS)
654
+ if (!this.emailIsFromCollaborator(userEmail) && coupon.exclusivityType === i1$1.Exclusivities.COLLABORATORS)
652
655
  throw new InvalidCouponError('Você não é colaborador.');
653
656
  // Verifica se o email do usuário é associado ao cupom de uso por usuario
654
- if (coupon.exclusivityType === i2.Exclusivities.SPECIFIC_USER && coupon.userExclusiveEmail !== userEmail)
657
+ if (coupon.exclusivityType === i1$1.Exclusivities.SPECIFIC_USER && coupon.userExclusiveEmail !== userEmail)
655
658
  throw new InvalidCouponError('Cupom não é válido para este usuário.');
656
- couponRuleSubscription = coupon.exclusivityType === i2.Exclusivities.ACTIVE_SUBSCRIBER ||
657
- coupon.exclusivityType === i2.Exclusivities.INACTIVE_SUBSCRIBER ||
658
- coupon.exclusivityType === i2.Exclusivities.NON_SUBSCRIBER;
659
+ couponRuleSubscription = coupon.exclusivityType === i1$1.Exclusivities.ACTIVE_SUBSCRIBER ||
660
+ coupon.exclusivityType === i1$1.Exclusivities.INACTIVE_SUBSCRIBER ||
661
+ coupon.exclusivityType === i1$1.Exclusivities.NON_SUBSCRIBER;
659
662
  if (!(couponRuleSubscription && userEmail)) return [3 /*break*/, 2];
660
663
  return [4 /*yield*/, this.subscriptionRepository
661
664
  .find({
662
665
  filters: {
663
666
  user: {
664
- email: { operator: i2.Where.EQUALS, value: userEmail },
667
+ email: { operator: i1$1.Where.EQUALS, value: userEmail },
665
668
  },
666
669
  },
667
670
  })
668
671
  .then(function (sub) { return sub.data; })];
669
672
  case 1:
670
673
  sub = _d.sent();
671
- activeSubs = sub === null || sub === void 0 ? void 0 : sub.filter(function (s) { return s.status === i2.Status.ACTIVE; });
674
+ activeSubs = sub === null || sub === void 0 ? void 0 : sub.filter(function (s) { return s.status === i1$1.Status.ACTIVE; });
672
675
  switch (coupon.exclusivityType) {
673
- case i2.Exclusivities.ACTIVE_SUBSCRIBER:
676
+ case i1$1.Exclusivities.ACTIVE_SUBSCRIBER:
674
677
  return [2 /*return*/, activeSubs.length > 0];
675
- case i2.Exclusivities.INACTIVE_SUBSCRIBER:
678
+ case i1$1.Exclusivities.INACTIVE_SUBSCRIBER:
676
679
  return [2 /*return*/, activeSubs.length === 0];
677
- case i2.Exclusivities.NON_SUBSCRIBER:
680
+ case i1$1.Exclusivities.NON_SUBSCRIBER:
678
681
  return [2 /*return*/, sub.length === 0];
679
682
  default:
680
683
  return [2 /*return*/, false];
@@ -722,7 +725,7 @@
722
725
  return [{ type: undefined, decorators: [{
723
726
  type: i0.Inject,
724
727
  args: ['CouponRepository']
725
- }] }, { type: i2__namespace.Shops, decorators: [{
728
+ }] }, { type: i1__namespace$1.Shops, decorators: [{
726
729
  type: i0.Inject,
727
730
  args: [DEFAULT_SHOP]
728
731
  }] }, { type: undefined, decorators: [{
@@ -747,19 +750,19 @@
747
750
  }
748
751
  CheckoutService.prototype.getCheckout = function (checkoutData) {
749
752
  var checkoutId = cookie__default["default"].get('checkoutId');
750
- if (!i2.isNil(checkoutId))
753
+ if (!i1$1.isNil(checkoutId))
751
754
  return rxjs.from(this.checkoutRepository.get({ id: checkoutId }));
752
755
  return rxjs.from(this.createCheckout(checkoutData));
753
756
  };
754
757
  CheckoutService.prototype.getUserByCheckout = function (checkoutId) {
755
758
  var _this = this;
756
- return rxjs.from(this.checkoutRepository.get({ id: checkoutId })).pipe(operators.concatMap(function (checkout) { var _a; return ((_a = checkout === null || checkout === void 0 ? void 0 : checkout.user) === null || _a === void 0 ? void 0 : _a.id) ? rxjs.of(checkout.user) : rxjs.from(_this.userRepository.get({ id: checkout.user.id })); }), operators.concatMap(function (user) { return rxjs.of(user) || rxjs.throwError(function () { return new i2.NotFoundError('User is not found'); }); }));
759
+ return rxjs.from(this.checkoutRepository.get({ id: checkoutId })).pipe(operators.concatMap(function (checkout) { var _a; return ((_a = checkout === null || checkout === void 0 ? void 0 : checkout.user) === null || _a === void 0 ? void 0 : _a.id) ? rxjs.of(checkout.user) : rxjs.from(_this.userRepository.get({ id: checkout.user.id })); }), operators.concatMap(function (user) { return rxjs.of(user) || rxjs.throwError(function () { return new i1$1.NotFoundError('User is not found'); }); }));
757
760
  };
758
761
  CheckoutService.prototype.updateCheckoutLineItems = function (checkout) {
759
- return rxjs.from(this.checkoutRepository.update(i2.Checkout.toInstance({ id: checkout.id, lineItems: checkout.lineItems })));
762
+ return rxjs.from(this.checkoutRepository.update(i1$1.Checkout.toInstance({ id: checkout.id, lineItems: checkout.lineItems })));
760
763
  };
761
764
  CheckoutService.prototype.updateCheckoutUser = function (checkout) {
762
- return rxjs.from(this.checkoutRepository.update(i2.Checkout.toInstance({ id: checkout.id, user: checkout.user })));
765
+ return rxjs.from(this.checkoutRepository.update(i1$1.Checkout.toInstance({ id: checkout.id, user: checkout.user })));
763
766
  };
764
767
  CheckoutService.prototype.clearCheckoutFromSession = function () {
765
768
  cookie__default["default"].remove('checkoutId');
@@ -779,7 +782,7 @@
779
782
  return this.getCheckout().pipe(operators.concatMap(function (checkout) {
780
783
  var _a;
781
784
  return _this.couponService
782
- .checkCoupon(nickname, (_a = checkout.user) === null || _a === void 0 ? void 0 : _a.email, i2.CheckoutTypes.ECOMMERCE, checkout.user.subscriptionPlan, checkout, false)
785
+ .checkCoupon(nickname, (_a = checkout.user) === null || _a === void 0 ? void 0 : _a.email, i1$1.CheckoutTypes.ECOMMERCE, checkout.user.subscriptionPlan, checkout, false)
783
786
  .pipe();
784
787
  }));
785
788
  };
@@ -788,7 +791,7 @@
788
791
  var checkout;
789
792
  return __generator(this, function (_b) {
790
793
  switch (_b.label) {
791
- case 0: return [4 /*yield*/, this.checkoutRepository.create(Object.assign(Object.assign({ createdAt: new Date() }, i2.Checkout.toInstance(i2.pick(checkoutData, ['user', 'shop'])).toPlain()), { shop: (checkoutData === null || checkoutData === void 0 ? void 0 : checkoutData.shop) || this.defaultShop }))];
794
+ case 0: return [4 /*yield*/, this.checkoutRepository.create(Object.assign(Object.assign({ createdAt: new Date() }, i1$1.Checkout.toInstance(i1$1.pick(checkoutData, ['user', 'shop'])).toPlain()), { shop: (checkoutData === null || checkoutData === void 0 ? void 0 : checkoutData.shop) || this.defaultShop }))];
792
795
  case 1:
793
796
  checkout = _b.sent();
794
797
  cookie__default["default"].set('checkoutId', checkout.id);
@@ -813,7 +816,7 @@
813
816
  }] }, { type: undefined, decorators: [{
814
817
  type: i0.Inject,
815
818
  args: ['UserRepository']
816
- }] }, { type: i2__namespace.Shops, decorators: [{
819
+ }] }, { type: i1__namespace$1.Shops, decorators: [{
817
820
  type: i0.Inject,
818
821
  args: [DEFAULT_SHOP]
819
822
  }] }];
@@ -827,7 +830,7 @@
827
830
  this.defaultShop = defaultShop;
828
831
  this.productRepository = productRepository;
829
832
  this.cartSubject = new rxjs.Subject();
830
- this.updateLineItemInCart = function (lineItem, quantity, checkout) { return (i2.isNil(checkout) ? _this.checkoutService.getCheckout() : rxjs.of(checkout)).pipe(operators.concatMap(function (checkoutLoaded) {
833
+ this.updateLineItemInCart = function (lineItem, quantity, checkout) { return (i1$1.isNil(checkout) ? _this.checkoutService.getCheckout() : rxjs.of(checkout)).pipe(operators.concatMap(function (checkoutLoaded) {
831
834
  var _a;
832
835
  var items = [];
833
836
  var index = (_a = checkoutLoaded.lineItems) === null || _a === void 0 ? void 0 : _a.map(function (checkoutItem) { return checkoutItem.sku; }).indexOf(lineItem.sku);
@@ -845,7 +848,7 @@
845
848
  var cart = {};
846
849
  items === null || items === void 0 ? void 0 : items.forEach(function (item) {
847
850
  var _a;
848
- return (cart[item.sku] = i2.LineItem.toInstance(Object.assign(Object.assign({}, (cart[item.sku] || item)), { quantity: (((_a = cart[item.sku]) === null || _a === void 0 ? void 0 : _a.quantity) || 0) + (item.quantity ? item.quantity : 1) })));
851
+ return (cart[item.sku] = i1$1.LineItem.toInstance(Object.assign(Object.assign({}, (cart[item.sku] || item)), { quantity: (((_a = cart[item.sku]) === null || _a === void 0 ? void 0 : _a.quantity) || 0) + (item.quantity ? item.quantity : 1) })));
849
852
  });
850
853
  return cart;
851
854
  };
@@ -869,11 +872,9 @@
869
872
  shop: checkout.shop || this.defaultShop,
870
873
  isSubscriber: (_e = checkout.user) === null || _e === void 0 ? void 0 : _e.isSubscriber,
871
874
  });
872
- console.log('checkout buildLineItem pricePaid', pricePaid);
873
- console.log('checkout buildLineItem', checkout);
874
875
  return [2 /*return*/, {
875
876
  checkout: checkout,
876
- lineItem: i2.LineItem.toInstance({
877
+ lineItem: i1$1.LineItem.toInstance({
877
878
  id: id,
878
879
  name: name !== null && name !== void 0 ? name : product.name,
879
880
  EAN: EAN !== null && EAN !== void 0 ? EAN : product.EAN,
@@ -901,8 +902,7 @@
901
902
  var info = product.price;
902
903
  if (product.isGift)
903
904
  return 0;
904
- console.log('getProductPrice', isSubscriber, info.subscriberPrice, info.price, (isSubscriber && info.subscriberPrice > 0));
905
- return (isSubscriber && info.subscriberPrice > 0) ? info.subscriberPrice : info.price;
905
+ return isSubscriber && info.subscriberPrice > 0 ? info.subscriberPrice : info.price;
906
906
  };
907
907
  this.checkMaxStock = function (item, quantity) {
908
908
  var _a;
@@ -929,7 +929,7 @@
929
929
  return this.checkoutService.getCheckout().pipe(operators.map(function (checkout) {
930
930
  var _a;
931
931
  var checkoutItem = (_a = checkout.lineItems) === null || _a === void 0 ? void 0 : _a.find(function (lineItem) { return lineItem.sku === item.sku; });
932
- if (!i2.isNil(checkoutItem))
932
+ if (!i1$1.isNil(checkoutItem))
933
933
  checkoutItem.quantity -= checkoutItem.quantity > 1 ? 1 : 0;
934
934
  return checkout;
935
935
  }), operators.concatMap(function (checkout) { return _this.checkoutService.updateCheckoutLineItems(checkout); }), operators.map(function (checkout) { return _this.generateCartObject(checkout.lineItems); }), operators.tap(function (cart) { return _this.cartSubject.next(cart); }));
@@ -956,14 +956,14 @@
956
956
  };
957
957
  CartService.prototype.updateUserCart = function (user) {
958
958
  var _this = this;
959
- return this.checkoutService.getCheckout().pipe(operators.concatMap(function (checkout) { return _this.checkoutService.updateCheckoutUser(i2.Checkout.toInstance(Object.assign(Object.assign({}, checkout.toPlain()), { user: user }))); }), operators.concatMap(function (checkout) { return __awaiter(_this, void 0, void 0, function () {
959
+ return this.checkoutService.getCheckout().pipe(operators.concatMap(function (checkout) { return _this.checkoutService.updateCheckoutUser(i1$1.Checkout.toInstance(Object.assign(Object.assign({}, checkout.toPlain()), { user: user }))); }), operators.concatMap(function (checkout) { return __awaiter(_this, void 0, void 0, function () {
960
960
  var _a, _b, _h, _j, _k, _l, _m, _o, _p, _q, _r;
961
961
  var _this = this;
962
962
  return __generator(this, function (_s) {
963
963
  switch (_s.label) {
964
964
  case 0:
965
965
  _j = (_h = this.checkoutService).updateCheckoutLineItems;
966
- _l = (_k = i2.Checkout).toInstance;
966
+ _l = (_k = i1$1.Checkout).toInstance;
967
967
  _o = (_m = Object).assign;
968
968
  _p = [Object.assign({}, checkout.toPlain())];
969
969
  _q = {};
@@ -1003,7 +1003,7 @@
1003
1003
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: CartService, decorators: [{
1004
1004
  type: i0.Injectable
1005
1005
  }], ctorParameters: function () {
1006
- return [{ type: AuthService }, { type: CheckoutService }, { type: i2__namespace.Shops, decorators: [{
1006
+ return [{ type: AuthService }, { type: CheckoutService }, { type: i1__namespace$1.Shops, decorators: [{
1007
1007
  type: i0.Inject,
1008
1008
  args: [DEFAULT_SHOP]
1009
1009
  }] }, { type: undefined, decorators: [{
@@ -1020,7 +1020,7 @@
1020
1020
  }
1021
1021
  CheckoutSubscriptionService.prototype.getCheckoutSubscription = function (checkoutData) {
1022
1022
  var checkoutId = cookie__default["default"].get('checkoutSubscriptionId');
1023
- if (!i2.isNil(checkoutId))
1023
+ if (!i1$1.isNil(checkoutId))
1024
1024
  return rxjs.from(this.checkoutSubscriptionRepository.get({ id: checkoutId }));
1025
1025
  return rxjs.from(this.createCheckoutSubscription(checkoutData));
1026
1026
  };
@@ -1029,7 +1029,7 @@
1029
1029
  var checkout;
1030
1030
  return __generator(this, function (_a) {
1031
1031
  switch (_a.label) {
1032
- case 0: return [4 /*yield*/, this.checkoutSubscriptionRepository.create(Object.assign({ createdAt: new Date() }, i2.CheckoutSubscription.toInstance(i2.pick(checkoutData, ['user', 'shop'])).toPlain()))];
1032
+ case 0: return [4 /*yield*/, this.checkoutSubscriptionRepository.create(Object.assign({ createdAt: new Date() }, i1$1.CheckoutSubscription.toInstance(i1$1.pick(checkoutData, ['user', 'shop'])).toPlain()))];
1033
1033
  case 1:
1034
1034
  checkout = _a.sent();
1035
1035
  cookie__default["default"].set('checkoutSubscriptionId', checkout.id);
@@ -1044,7 +1044,7 @@
1044
1044
  };
1045
1045
  CheckoutSubscriptionService.prototype.checkCoupon = function (nickname, userEmail) {
1046
1046
  var _this = this;
1047
- return this.getCheckoutSubscription().pipe(operators.concatMap(function (checkout) { return _this.couponService.checkCoupon(nickname, userEmail, i2.CheckoutTypes.SUBSCRIPTION, checkout.subscriptionPlan.name, null, true).pipe(); }));
1047
+ return this.getCheckoutSubscription().pipe(operators.concatMap(function (checkout) { return _this.couponService.checkCoupon(nickname, userEmail, i1$1.CheckoutTypes.SUBSCRIPTION, checkout.subscriptionPlan.name, null, true).pipe(); }));
1048
1048
  };
1049
1049
  CheckoutSubscriptionService.prototype.calcDiscountSubscription = function (coupon) {
1050
1050
  var _this = this;
@@ -1066,65 +1066,40 @@
1066
1066
  }] }, { type: CouponService }];
1067
1067
  } });
1068
1068
 
1069
- var OrderService = /** @class */ (function () {
1070
- function OrderService(angularFirestore, orderRepository) {
1071
- this.angularFirestore = angularFirestore;
1072
- this.orderRepository = orderRepository;
1073
- this.orderSubject = new rxjs.Subject();
1074
- }
1075
- OrderService.prototype.getOrder = function (id) {
1076
- var _this = this;
1077
- this.angularFirestore
1078
- .doc(this.orderRepository.collectionName + "/" + id)
1079
- .valueChanges()
1080
- .pipe(operators.map(function (doc) { return i2.Order.toInstance(doc); }))
1081
- .subscribe(function (doc) { return _this.orderSubject.next(doc); });
1082
- return this.orderSubject;
1083
- };
1084
- return OrderService;
1085
- }());
1086
- OrderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: OrderService, deps: [{ token: i1__namespace$1.AngularFirestore }, { token: 'OrderRepository' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1087
- OrderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: OrderService });
1088
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: OrderService, decorators: [{
1089
- type: i0.Injectable
1090
- }], ctorParameters: function () {
1091
- return [{ type: i1__namespace$1.AngularFirestore }, { type: i2__namespace.OrderFirestoreRepository, decorators: [{
1092
- type: i0.Inject,
1093
- args: ['OrderRepository']
1094
- }] }];
1095
- } });
1096
-
1097
1069
  var HomeShopService = /** @class */ (function () {
1098
1070
  function HomeShopService(categoryRepository, homeRepository, productRepository, defaultShop) {
1099
1071
  this.categoryRepository = categoryRepository;
1100
1072
  this.homeRepository = homeRepository;
1101
1073
  this.productRepository = productRepository;
1102
1074
  this.defaultShop = defaultShop;
1103
- this.buildCategoryGroupWithRequiredData = function (group) { return ({
1104
- category: i2.Category.toInstance(i2.pick(group.category.toPlain(), ['id', 'name', 'slug', 'conditions'])),
1105
- products: group.products.map(function (product) { return i2.Product.toInstance(i2.pick(product.toPlain(), [
1106
- 'id',
1107
- 'price',
1108
- 'reviews',
1109
- 'hasVariants',
1110
- 'slug',
1111
- 'sku',
1112
- 'stock',
1113
- 'costPrice',
1114
- 'images',
1115
- 'miniatures',
1116
- 'name',
1117
- 'weight',
1118
- 'rate',
1119
- 'type'
1120
- ])); }),
1121
- }); };
1075
+ this.buildCategoryGroupWithRequiredData = function (group) {
1076
+ var _a, _b;
1077
+ return ({
1078
+ category: i1$1.Category.toInstance(i1$1.pick(((_a = group === null || group === void 0 ? void 0 : group.category) === null || _a === void 0 ? void 0 : _a.toPlain()) || {}, ['id', 'name', 'slug', 'conditions'])),
1079
+ products: ((_b = group === null || group === void 0 ? void 0 : group.products) === null || _b === void 0 ? void 0 : _b.map(function (product) { return i1$1.Product.toInstance(i1$1.pick((product === null || product === void 0 ? void 0 : product.toPlain()) || {}, [
1080
+ 'id',
1081
+ 'price',
1082
+ 'reviews',
1083
+ 'hasVariants',
1084
+ 'slug',
1085
+ 'sku',
1086
+ 'stock',
1087
+ 'costPrice',
1088
+ 'images',
1089
+ 'miniatures',
1090
+ 'name',
1091
+ 'weight',
1092
+ 'rate',
1093
+ 'type',
1094
+ ])); })) || [],
1095
+ });
1096
+ };
1122
1097
  }
1123
1098
  Object.defineProperty(HomeShopService.prototype, "homeId", {
1124
1099
  get: function () {
1125
- if (this.defaultShop === i2.Shops.GLAMSHOP)
1100
+ if (this.defaultShop === i1$1.Shops.GLAMSHOP)
1126
1101
  return 'glamshop';
1127
- if (this.defaultShop === i2.Shops.MENSMARKET)
1102
+ if (this.defaultShop === i1$1.Shops.MENSMARKET)
1128
1103
  return 'mens_market';
1129
1104
  return null;
1130
1105
  },
@@ -1135,8 +1110,8 @@
1135
1110
  var _this = this;
1136
1111
  return this.getHomeConfiguration().pipe(operators.map(function (home) { var _a; return (((_a = home === null || home === void 0 ? void 0 : home.data) === null || _a === void 0 ? void 0 : _a.expiresAt) > new Date() ? home : null); }), operators.concatMap(function (home) { return home
1137
1112
  ? rxjs.of(home)
1138
- : rxjs.forkJoin([_this.getDiscoverProducts(), _this.getFeaturedProducts(), _this.getVerticalProducts()]).pipe(operators.map(function (_b) {
1139
- var _c = __read(_b, 3), discoverProducts = _c[0], featuredProducts = _c[1], verticalProducts = _c[2];
1113
+ : rxjs.forkJoin([_this.getDiscoverProducts(), _this.getFeaturedProducts(), _this.getVerticalProducts()]).pipe(operators.map(function (_c) {
1114
+ var _d = __read(_c, 3), discoverProducts = _d[0], featuredProducts = _d[1], verticalProducts = _d[2];
1140
1115
  return ({
1141
1116
  discoverProducts: discoverProducts,
1142
1117
  featuredProducts: featuredProducts,
@@ -1170,10 +1145,10 @@
1170
1145
  HomeShopService.prototype.getVerticalProducts = function () {
1171
1146
  var _this = this;
1172
1147
  return this.getHomeConfiguration().pipe(operators.concatMap(function (home) { return rxjs.forkJoin(home.verticalCarousels.filter(Boolean).map(function (id) { return rxjs.from(_this.categoryRepository.get({ id: id })).pipe(operators.concatMap(function (category) { return rxjs.from(_this.productRepository.find({
1173
- filters: { categories: { operator: i2.Where.IN, value: [category.id] } },
1148
+ filters: { categories: { operator: i1$1.Where.IN, value: [category.id] } },
1174
1149
  limits: { limit: 12 },
1175
- })).pipe(operators.map(function (products) { return ({ category: category, products: products }); })); }), operators.map(function (_b) {
1176
- var category = _b.category, products = _b.products;
1150
+ })).pipe(operators.map(function (products) { return ({ category: category, products: products }); })); }), operators.map(function (_c) {
1151
+ var category = _c.category, products = _c.products;
1177
1152
  return ({ category: category, products: products.data });
1178
1153
  }), operators.map(_this.buildCategoryGroupWithRequiredData)); })); }));
1179
1154
  };
@@ -1182,14 +1157,14 @@
1182
1157
  return rxjs.of(this.homeConfiguration).pipe(operators.concatMap(function (home) { return home
1183
1158
  ? rxjs.of(home)
1184
1159
  : !_this.homeId
1185
- ? rxjs.throwError(new i2.RequiredArgumentError(['homeId']))
1160
+ ? rxjs.throwError(new i1$1.RequiredArgumentError(['homeId']))
1186
1161
  : rxjs.from(_this.homeRepository.get({ id: _this.homeId })).pipe(operators.tap(function (homeLoaded) { return (_this.homeConfiguration = homeLoaded); })); }));
1187
1162
  };
1188
1163
  HomeShopService.prototype.saveHomeData = function (homeData) {
1189
1164
  var _this = this;
1190
1165
  var data = {
1191
1166
  createdAt: new Date(),
1192
- expiresAt: i2.add(new Date(), { hours: 1 }),
1167
+ expiresAt: i1$1.add(new Date(), { hours: 1 }),
1193
1168
  data: homeData,
1194
1169
  };
1195
1170
  return rxjs.from(this.homeRepository.update({
@@ -1213,12 +1188,85 @@
1213
1188
  }] }, { type: undefined, decorators: [{
1214
1189
  type: i0.Inject,
1215
1190
  args: ['ProductRepository']
1216
- }] }, { type: i2__namespace.Shops, decorators: [{
1191
+ }] }, { type: i1__namespace$1.Shops, decorators: [{
1217
1192
  type: i0.Inject,
1218
1193
  args: [DEFAULT_SHOP]
1219
1194
  }] }];
1220
1195
  } });
1221
1196
 
1197
+ var OrderService = /** @class */ (function () {
1198
+ function OrderService(angularFirestore, orderRepository) {
1199
+ this.angularFirestore = angularFirestore;
1200
+ this.orderRepository = orderRepository;
1201
+ this.orderSubject = new rxjs.Subject();
1202
+ }
1203
+ OrderService.prototype.getOrder = function (id) {
1204
+ var _this = this;
1205
+ this.angularFirestore
1206
+ .doc(this.orderRepository.collectionName + "/" + id)
1207
+ .valueChanges()
1208
+ .pipe(operators.map(function (doc) { return i1$1.Order.toInstance(doc); }))
1209
+ .subscribe(function (doc) { return _this.orderSubject.next(doc); });
1210
+ return this.orderSubject;
1211
+ };
1212
+ return OrderService;
1213
+ }());
1214
+ OrderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: OrderService, deps: [{ token: i1__namespace$2.AngularFirestore }, { token: 'OrderRepository' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1215
+ OrderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: OrderService });
1216
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: OrderService, decorators: [{
1217
+ type: i0.Injectable
1218
+ }], ctorParameters: function () {
1219
+ return [{ type: i1__namespace$2.AngularFirestore }, { type: i1__namespace$1.OrderFirestoreRepository, decorators: [{
1220
+ type: i0.Inject,
1221
+ args: ['OrderRepository']
1222
+ }] }];
1223
+ } });
1224
+
1225
+ var ShippingService = /** @class */ (function () {
1226
+ function ShippingService(http) {
1227
+ this.http = http;
1228
+ }
1229
+ ShippingService.prototype.getMensShippingMethods = function (zip, weightGrams, totalPrice, personId, subscriptionPlan) {
1230
+ return this.http.get(API_URL + "open/checkshippingcompany?personId=" + personId + "&postalCode=" + zip + "&weightGrams=" + weightGrams)
1231
+ .pipe(operators.map(function (data) { return data.result; }), operators.map(function (shippingMethods) {
1232
+ var shippingMethodsResponse = [];
1233
+ if (!shippingMethods.length)
1234
+ return [];
1235
+ if (totalPrice >= 200) {
1236
+ return shippingMethods.map(function (s) {
1237
+ if (s.serviceName !== 'Same Day')
1238
+ return Object.assign(Object.assign({}, s), { totalPrice: 0 });
1239
+ else
1240
+ return s;
1241
+ });
1242
+ }
1243
+ if (subscriptionPlan && subscriptionPlan == 'SELECT') {
1244
+ return shippingMethods.map(function (s) {
1245
+ if (s.serviceName !== 'Same Day')
1246
+ return Object.assign(Object.assign({}, s), { totalPrice: 0 });
1247
+ else
1248
+ return s;
1249
+ });
1250
+ }
1251
+ if (subscriptionPlan && subscriptionPlan == 'PRIME') {
1252
+ return shippingMethods.map(function (s) {
1253
+ if (s.serviceName !== 'Same Day')
1254
+ return Object.assign(Object.assign({}, s), { totalPrice: s.totalPrice / 2 });
1255
+ else
1256
+ return s;
1257
+ });
1258
+ }
1259
+ return shippingMethodsResponse;
1260
+ }));
1261
+ };
1262
+ return ShippingService;
1263
+ }());
1264
+ ShippingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ShippingService, deps: [{ token: i1__namespace$3.HttpClient }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1265
+ ShippingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ShippingService });
1266
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ShippingService, decorators: [{
1267
+ type: i0.Injectable
1268
+ }], ctorParameters: function () { return [{ type: i1__namespace$3.HttpClient }]; } });
1269
+
1222
1270
  var AngularFirebaseAuthModule = /** @class */ (function () {
1223
1271
  function AngularFirebaseAuthModule() {
1224
1272
  }
@@ -1239,42 +1287,42 @@
1239
1287
  {
1240
1288
  provide: 'Authentication',
1241
1289
  useFactory: function (authenticationService, userRepository) {
1242
- return new i2.Authentication(authenticationService, userRepository);
1290
+ return new i1$1.Authentication(authenticationService, userRepository);
1243
1291
  },
1244
1292
  deps: ['AuthenticationService', 'UserRepository'],
1245
1293
  },
1246
1294
  {
1247
1295
  provide: 'AuthenticationService',
1248
1296
  useFactory: function (angularFireAuth) {
1249
- return new i2.AuthenticationFirebaseAuthService(angularFireAuth);
1297
+ return new i1$1.AuthenticationFirebaseAuthService(angularFireAuth);
1250
1298
  },
1251
1299
  deps: [i1.AngularFireAuth],
1252
1300
  },
1253
1301
  {
1254
1302
  provide: 'Register',
1255
1303
  useFactory: function (registerService, userRepository) {
1256
- return new i2.Register(registerService, userRepository);
1304
+ return new i1$1.Register(registerService, userRepository);
1257
1305
  },
1258
1306
  deps: ['RegisterService', 'UserRepository'],
1259
1307
  },
1260
1308
  {
1261
1309
  provide: 'RegisterService',
1262
1310
  useFactory: function (angularFireAuth) {
1263
- return new i2.RegisterFirebaseAuthService(angularFireAuth);
1311
+ return new i1$1.RegisterFirebaseAuthService(angularFireAuth);
1264
1312
  },
1265
1313
  deps: [i1.AngularFireAuth],
1266
1314
  },
1267
1315
  {
1268
1316
  provide: 'SignOut',
1269
1317
  useFactory: function (authenticationService) {
1270
- return new i2.SignOut(authenticationService);
1318
+ return new i1$1.SignOut(authenticationService);
1271
1319
  },
1272
1320
  deps: ['AuthenticationService'],
1273
1321
  },
1274
1322
  {
1275
1323
  provide: 'RecoveryPassword',
1276
1324
  useFactory: function (authenticationService) {
1277
- return new i2.RecoveryPassword(authenticationService);
1325
+ return new i1$1.RecoveryPassword(authenticationService);
1278
1326
  },
1279
1327
  deps: ['AuthenticationService'],
1280
1328
  },
@@ -1287,42 +1335,42 @@
1287
1335
  {
1288
1336
  provide: 'Authentication',
1289
1337
  useFactory: function (authenticationService, userRepository) {
1290
- return new i2.Authentication(authenticationService, userRepository);
1338
+ return new i1$1.Authentication(authenticationService, userRepository);
1291
1339
  },
1292
1340
  deps: ['AuthenticationService', 'UserRepository'],
1293
1341
  },
1294
1342
  {
1295
1343
  provide: 'AuthenticationService',
1296
1344
  useFactory: function (angularFireAuth) {
1297
- return new i2.AuthenticationFirebaseAuthService(angularFireAuth);
1345
+ return new i1$1.AuthenticationFirebaseAuthService(angularFireAuth);
1298
1346
  },
1299
1347
  deps: [i1.AngularFireAuth],
1300
1348
  },
1301
1349
  {
1302
1350
  provide: 'Register',
1303
1351
  useFactory: function (registerService, userRepository) {
1304
- return new i2.Register(registerService, userRepository);
1352
+ return new i1$1.Register(registerService, userRepository);
1305
1353
  },
1306
1354
  deps: ['RegisterService', 'UserRepository'],
1307
1355
  },
1308
1356
  {
1309
1357
  provide: 'RegisterService',
1310
1358
  useFactory: function (angularFireAuth) {
1311
- return new i2.RegisterFirebaseAuthService(angularFireAuth);
1359
+ return new i1$1.RegisterFirebaseAuthService(angularFireAuth);
1312
1360
  },
1313
1361
  deps: [i1.AngularFireAuth],
1314
1362
  },
1315
1363
  {
1316
1364
  provide: 'SignOut',
1317
1365
  useFactory: function (authenticationService) {
1318
- return new i2.SignOut(authenticationService);
1366
+ return new i1$1.SignOut(authenticationService);
1319
1367
  },
1320
1368
  deps: ['AuthenticationService'],
1321
1369
  },
1322
1370
  {
1323
1371
  provide: 'RecoveryPassword',
1324
1372
  useFactory: function (authenticationService) {
1325
- return new i2.RecoveryPassword(authenticationService);
1373
+ return new i1$1.RecoveryPassword(authenticationService);
1326
1374
  },
1327
1375
  deps: ['AuthenticationService'],
1328
1376
  },
@@ -1345,9 +1393,9 @@
1345
1393
  AngularElasticSeachModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: AngularElasticSeachModule });
1346
1394
  AngularElasticSeachModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: AngularElasticSeachModule, providers: [
1347
1395
  {
1348
- provide: i2.ProductsIndex,
1396
+ provide: i1$1.ProductsIndex,
1349
1397
  useFactory: function (configuration) {
1350
- return new i2.ProductsIndex(new i2.AxiosAdapter(configuration));
1398
+ return new i1$1.ProductsIndex(new i1$1.AxiosAdapter(configuration));
1351
1399
  },
1352
1400
  deps: [ES_CONFIG],
1353
1401
  },
@@ -1357,9 +1405,9 @@
1357
1405
  args: [{
1358
1406
  providers: [
1359
1407
  {
1360
- provide: i2.ProductsIndex,
1408
+ provide: i1$1.ProductsIndex,
1361
1409
  useFactory: function (configuration) {
1362
- return new i2.ProductsIndex(new i2.AxiosAdapter(configuration));
1410
+ return new i1$1.ProductsIndex(new i1$1.AxiosAdapter(configuration));
1363
1411
  },
1364
1412
  deps: [ES_CONFIG],
1365
1413
  },
@@ -1388,161 +1436,161 @@
1388
1436
  {
1389
1437
  provide: 'BeautyProfileRepository',
1390
1438
  useFactory: function (firestore, userRepository) {
1391
- return new i2.UserBeautyProfileFirestoreRepository(firestore.firestore, userRepository);
1439
+ return new i1$1.UserBeautyProfileFirestoreRepository(firestore.firestore, userRepository);
1392
1440
  },
1393
- deps: [i1$1.AngularFirestore, 'UserRepository'],
1441
+ deps: [i1$2.AngularFirestore, 'UserRepository'],
1394
1442
  },
1395
1443
  {
1396
1444
  provide: 'Buy2WinRepository',
1397
1445
  useFactory: function (firestore) {
1398
- return new i2.Buy2WinFirestoreRepository(firestore.firestore);
1446
+ return new i1$1.Buy2WinFirestoreRepository(firestore.firestore);
1399
1447
  },
1400
- deps: [i1$1.AngularFirestore],
1448
+ deps: [i1$2.AngularFirestore],
1401
1449
  },
1402
1450
  {
1403
- provide: i2.CategoryFirestoreRepository,
1451
+ provide: i1$1.CategoryFirestoreRepository,
1404
1452
  useFactory: function (firestore) {
1405
- return new i2.CategoryFirestoreRepository(firestore.firestore);
1453
+ return new i1$1.CategoryFirestoreRepository(firestore.firestore);
1406
1454
  },
1407
- deps: [i1$1.AngularFirestore],
1455
+ deps: [i1$2.AngularFirestore],
1408
1456
  },
1409
1457
  {
1410
1458
  provide: 'CheckoutRepository',
1411
1459
  useFactory: function (firestore) {
1412
- return new i2.CheckoutFirestoreRepository(firestore.firestore);
1460
+ return new i1$1.CheckoutFirestoreRepository(firestore.firestore);
1413
1461
  },
1414
- deps: [i1$1.AngularFirestore],
1462
+ deps: [i1$2.AngularFirestore],
1415
1463
  },
1416
1464
  {
1417
1465
  provide: 'CheckoutSubscriptionRepository',
1418
1466
  useFactory: function (firestore) {
1419
- return new i2.CheckoutSubscriptionFirestoreRepository(firestore.firestore);
1467
+ return new i1$1.CheckoutSubscriptionFirestoreRepository(firestore.firestore);
1420
1468
  },
1421
- deps: [i1$1.AngularFirestore],
1469
+ deps: [i1$2.AngularFirestore],
1422
1470
  },
1423
1471
  {
1424
1472
  provide: 'CouponRepository',
1425
1473
  useFactory: function (firestore) {
1426
- return new i2.CouponFirestoreRepository(firestore.firestore);
1474
+ return new i1$1.CouponFirestoreRepository(firestore.firestore);
1427
1475
  },
1428
- deps: [i1$1.AngularFirestore],
1476
+ deps: [i1$2.AngularFirestore],
1429
1477
  },
1430
1478
  {
1431
1479
  provide: 'EditionRepository',
1432
1480
  useFactory: function (firestore, subscriptionRepository) {
1433
- return new i2.SubscriptionEditionFirestoreRepository(firestore.firestore, subscriptionRepository);
1481
+ return new i1$1.SubscriptionEditionFirestoreRepository(firestore.firestore, subscriptionRepository);
1434
1482
  },
1435
- deps: [i1$1.AngularFirestore, 'SubscriptionRepository'],
1483
+ deps: [i1$2.AngularFirestore, 'SubscriptionRepository'],
1436
1484
  },
1437
1485
  {
1438
1486
  provide: 'HomeRepository',
1439
1487
  useFactory: function (firestore) {
1440
- return new i2.HomeFirestoreRepository(firestore.firestore);
1488
+ return new i1$1.HomeFirestoreRepository(firestore.firestore);
1441
1489
  },
1442
- deps: [i1$1.AngularFirestore],
1490
+ deps: [i1$2.AngularFirestore],
1443
1491
  },
1444
1492
  {
1445
1493
  provide: 'LeadRepository',
1446
1494
  useFactory: function (firestore) {
1447
- return new i2.LeadFirestoreRepository(firestore.firestore);
1495
+ return new i1$1.LeadFirestoreRepository(firestore.firestore);
1448
1496
  },
1449
- deps: [i1$1.AngularFirestore],
1497
+ deps: [i1$2.AngularFirestore],
1450
1498
  },
1451
1499
  {
1452
1500
  provide: 'LegacyOrderRepository',
1453
1501
  useFactory: function (firestore) {
1454
- return new i2.LegacyOrderFirestoreRepository(firestore.firestore);
1502
+ return new i1$1.LegacyOrderFirestoreRepository(firestore.firestore);
1455
1503
  },
1456
- deps: [i1$1.AngularFirestore],
1504
+ deps: [i1$2.AngularFirestore],
1457
1505
  },
1458
1506
  {
1459
1507
  provide: 'ShopMenuRepository',
1460
1508
  useFactory: function (firestore) {
1461
- return new i2.ShopMenuFirestoreRepository(firestore.firestore);
1509
+ return new i1$1.ShopMenuFirestoreRepository(firestore.firestore);
1462
1510
  },
1463
- deps: [i1$1.AngularFirestore],
1511
+ deps: [i1$2.AngularFirestore],
1464
1512
  },
1465
1513
  {
1466
1514
  provide: 'OrderRepository',
1467
1515
  useFactory: function (firestore) {
1468
- return new i2.OrderFirestoreRepository(firestore.firestore);
1516
+ return new i1$1.OrderFirestoreRepository(firestore.firestore);
1469
1517
  },
1470
- deps: [i1$1.AngularFirestore],
1518
+ deps: [i1$2.AngularFirestore],
1471
1519
  },
1472
1520
  {
1473
1521
  provide: 'PaymentRepository',
1474
1522
  useFactory: function (firestore) {
1475
- return new i2.PaymentFirestoreRepository(firestore.firestore);
1523
+ return new i1$1.PaymentFirestoreRepository(firestore.firestore);
1476
1524
  },
1477
- deps: [i1$1.AngularFirestore],
1525
+ deps: [i1$2.AngularFirestore],
1478
1526
  },
1479
1527
  {
1480
- provide: i2.ProductFirestoreRepository,
1528
+ provide: i1$1.ProductFirestoreRepository,
1481
1529
  useFactory: function (firestore) {
1482
- return new i2.ProductFirestoreRepository(firestore.firestore);
1530
+ return new i1$1.ProductFirestoreRepository(firestore.firestore);
1483
1531
  },
1484
- deps: [i1$1.AngularFirestore],
1532
+ deps: [i1$2.AngularFirestore],
1485
1533
  },
1486
1534
  {
1487
1535
  provide: 'SubscriptionPaymentRepository',
1488
1536
  useFactory: function (firestore, subscriptionRepository) {
1489
- return new i2.SubscriptionPaymentFirestoreRepository(firestore.firestore, subscriptionRepository);
1537
+ return new i1$1.SubscriptionPaymentFirestoreRepository(firestore.firestore, subscriptionRepository);
1490
1538
  },
1491
- deps: [i1$1.AngularFirestore, 'SubscriptionRepository'],
1539
+ deps: [i1$2.AngularFirestore, 'SubscriptionRepository'],
1492
1540
  },
1493
1541
  {
1494
1542
  provide: 'SubscriptionPlanRepository',
1495
1543
  useFactory: function (firestore) {
1496
- return new i2.SubscriptionPlanFirestoreRepository(firestore.firestore);
1544
+ return new i1$1.SubscriptionPlanFirestoreRepository(firestore.firestore);
1497
1545
  },
1498
- deps: [i1$1.AngularFirestore],
1546
+ deps: [i1$2.AngularFirestore],
1499
1547
  },
1500
1548
  {
1501
1549
  provide: 'SubscriptionProductRepository',
1502
1550
  useFactory: function (firestore) {
1503
- return new i2.SubscriptionProductFirestoreRepository(firestore.firestore);
1551
+ return new i1$1.SubscriptionProductFirestoreRepository(firestore.firestore);
1504
1552
  },
1505
- deps: [i1$1.AngularFirestore],
1553
+ deps: [i1$2.AngularFirestore],
1506
1554
  },
1507
1555
  {
1508
1556
  provide: 'SubscriptionRepository',
1509
1557
  useFactory: function (firestore) {
1510
- return new i2.SubscriptionFirestoreRepository(firestore.firestore);
1558
+ return new i1$1.SubscriptionFirestoreRepository(firestore.firestore);
1511
1559
  },
1512
- deps: [i1$1.AngularFirestore],
1560
+ deps: [i1$2.AngularFirestore],
1513
1561
  },
1514
1562
  {
1515
1563
  provide: 'UserRepository',
1516
1564
  useFactory: function (firestore) {
1517
- return new i2.UserFirestoreRepository(firestore.firestore);
1565
+ return new i1$1.UserFirestoreRepository(firestore.firestore);
1518
1566
  },
1519
- deps: [i1$1.AngularFirestore],
1567
+ deps: [i1$2.AngularFirestore],
1520
1568
  },
1521
1569
  {
1522
1570
  provide: 'UserAddressRepository',
1523
1571
  useFactory: function (firestore, userRepository) {
1524
- return new i2.UserAddressFirestoreRepository(firestore.firestore, userRepository);
1572
+ return new i1$1.UserAddressFirestoreRepository(firestore.firestore, userRepository);
1525
1573
  },
1526
- deps: [i1$1.AngularFirestore, 'UserRepository'],
1574
+ deps: [i1$2.AngularFirestore, 'UserRepository'],
1527
1575
  },
1528
1576
  {
1529
1577
  provide: 'UserPaymentMethodRepository',
1530
1578
  useFactory: function (firestore, userRepository) {
1531
- return new i2.UserPaymentMethodFirestoreRepository(firestore.firestore, userRepository);
1579
+ return new i1$1.UserPaymentMethodFirestoreRepository(firestore.firestore, userRepository);
1532
1580
  },
1533
- deps: [i1$1.AngularFirestore, 'UserRepository'],
1581
+ deps: [i1$2.AngularFirestore, 'UserRepository'],
1534
1582
  },
1535
1583
  {
1536
- provide: i2.ProductVariantFirestoreRepository,
1584
+ provide: i1$1.ProductVariantFirestoreRepository,
1537
1585
  useFactory: function (firestore, productRepository) {
1538
- return new i2.ProductVariantFirestoreRepository(firestore.firestore, productRepository);
1586
+ return new i1$1.ProductVariantFirestoreRepository(firestore.firestore, productRepository);
1539
1587
  },
1540
- deps: [i1$1.AngularFirestore, i2.ProductFirestoreRepository],
1588
+ deps: [i1$2.AngularFirestore, i1$1.ProductFirestoreRepository],
1541
1589
  },
1542
1590
  {
1543
1591
  provide: i0.APP_INITIALIZER,
1544
1592
  useFactory: function (firestore) { return function () { return firestore.firestore.settings({ ignoreUndefinedProperties: true }); }; },
1545
- deps: [i1$1.AngularFirestore],
1593
+ deps: [i1$2.AngularFirestore],
1546
1594
  multi: true,
1547
1595
  },
1548
1596
  ], imports: [[fire.AngularFireModule, AngularElasticSeachModule]] });
@@ -1554,161 +1602,161 @@
1554
1602
  {
1555
1603
  provide: 'BeautyProfileRepository',
1556
1604
  useFactory: function (firestore, userRepository) {
1557
- return new i2.UserBeautyProfileFirestoreRepository(firestore.firestore, userRepository);
1605
+ return new i1$1.UserBeautyProfileFirestoreRepository(firestore.firestore, userRepository);
1558
1606
  },
1559
- deps: [i1$1.AngularFirestore, 'UserRepository'],
1607
+ deps: [i1$2.AngularFirestore, 'UserRepository'],
1560
1608
  },
1561
1609
  {
1562
1610
  provide: 'Buy2WinRepository',
1563
1611
  useFactory: function (firestore) {
1564
- return new i2.Buy2WinFirestoreRepository(firestore.firestore);
1612
+ return new i1$1.Buy2WinFirestoreRepository(firestore.firestore);
1565
1613
  },
1566
- deps: [i1$1.AngularFirestore],
1614
+ deps: [i1$2.AngularFirestore],
1567
1615
  },
1568
1616
  {
1569
- provide: i2.CategoryFirestoreRepository,
1617
+ provide: i1$1.CategoryFirestoreRepository,
1570
1618
  useFactory: function (firestore) {
1571
- return new i2.CategoryFirestoreRepository(firestore.firestore);
1619
+ return new i1$1.CategoryFirestoreRepository(firestore.firestore);
1572
1620
  },
1573
- deps: [i1$1.AngularFirestore],
1621
+ deps: [i1$2.AngularFirestore],
1574
1622
  },
1575
1623
  {
1576
1624
  provide: 'CheckoutRepository',
1577
1625
  useFactory: function (firestore) {
1578
- return new i2.CheckoutFirestoreRepository(firestore.firestore);
1626
+ return new i1$1.CheckoutFirestoreRepository(firestore.firestore);
1579
1627
  },
1580
- deps: [i1$1.AngularFirestore],
1628
+ deps: [i1$2.AngularFirestore],
1581
1629
  },
1582
1630
  {
1583
1631
  provide: 'CheckoutSubscriptionRepository',
1584
1632
  useFactory: function (firestore) {
1585
- return new i2.CheckoutSubscriptionFirestoreRepository(firestore.firestore);
1633
+ return new i1$1.CheckoutSubscriptionFirestoreRepository(firestore.firestore);
1586
1634
  },
1587
- deps: [i1$1.AngularFirestore],
1635
+ deps: [i1$2.AngularFirestore],
1588
1636
  },
1589
1637
  {
1590
1638
  provide: 'CouponRepository',
1591
1639
  useFactory: function (firestore) {
1592
- return new i2.CouponFirestoreRepository(firestore.firestore);
1640
+ return new i1$1.CouponFirestoreRepository(firestore.firestore);
1593
1641
  },
1594
- deps: [i1$1.AngularFirestore],
1642
+ deps: [i1$2.AngularFirestore],
1595
1643
  },
1596
1644
  {
1597
1645
  provide: 'EditionRepository',
1598
1646
  useFactory: function (firestore, subscriptionRepository) {
1599
- return new i2.SubscriptionEditionFirestoreRepository(firestore.firestore, subscriptionRepository);
1647
+ return new i1$1.SubscriptionEditionFirestoreRepository(firestore.firestore, subscriptionRepository);
1600
1648
  },
1601
- deps: [i1$1.AngularFirestore, 'SubscriptionRepository'],
1649
+ deps: [i1$2.AngularFirestore, 'SubscriptionRepository'],
1602
1650
  },
1603
1651
  {
1604
1652
  provide: 'HomeRepository',
1605
1653
  useFactory: function (firestore) {
1606
- return new i2.HomeFirestoreRepository(firestore.firestore);
1654
+ return new i1$1.HomeFirestoreRepository(firestore.firestore);
1607
1655
  },
1608
- deps: [i1$1.AngularFirestore],
1656
+ deps: [i1$2.AngularFirestore],
1609
1657
  },
1610
1658
  {
1611
1659
  provide: 'LeadRepository',
1612
1660
  useFactory: function (firestore) {
1613
- return new i2.LeadFirestoreRepository(firestore.firestore);
1661
+ return new i1$1.LeadFirestoreRepository(firestore.firestore);
1614
1662
  },
1615
- deps: [i1$1.AngularFirestore],
1663
+ deps: [i1$2.AngularFirestore],
1616
1664
  },
1617
1665
  {
1618
1666
  provide: 'LegacyOrderRepository',
1619
1667
  useFactory: function (firestore) {
1620
- return new i2.LegacyOrderFirestoreRepository(firestore.firestore);
1668
+ return new i1$1.LegacyOrderFirestoreRepository(firestore.firestore);
1621
1669
  },
1622
- deps: [i1$1.AngularFirestore],
1670
+ deps: [i1$2.AngularFirestore],
1623
1671
  },
1624
1672
  {
1625
1673
  provide: 'ShopMenuRepository',
1626
1674
  useFactory: function (firestore) {
1627
- return new i2.ShopMenuFirestoreRepository(firestore.firestore);
1675
+ return new i1$1.ShopMenuFirestoreRepository(firestore.firestore);
1628
1676
  },
1629
- deps: [i1$1.AngularFirestore],
1677
+ deps: [i1$2.AngularFirestore],
1630
1678
  },
1631
1679
  {
1632
1680
  provide: 'OrderRepository',
1633
1681
  useFactory: function (firestore) {
1634
- return new i2.OrderFirestoreRepository(firestore.firestore);
1682
+ return new i1$1.OrderFirestoreRepository(firestore.firestore);
1635
1683
  },
1636
- deps: [i1$1.AngularFirestore],
1684
+ deps: [i1$2.AngularFirestore],
1637
1685
  },
1638
1686
  {
1639
1687
  provide: 'PaymentRepository',
1640
1688
  useFactory: function (firestore) {
1641
- return new i2.PaymentFirestoreRepository(firestore.firestore);
1689
+ return new i1$1.PaymentFirestoreRepository(firestore.firestore);
1642
1690
  },
1643
- deps: [i1$1.AngularFirestore],
1691
+ deps: [i1$2.AngularFirestore],
1644
1692
  },
1645
1693
  {
1646
- provide: i2.ProductFirestoreRepository,
1694
+ provide: i1$1.ProductFirestoreRepository,
1647
1695
  useFactory: function (firestore) {
1648
- return new i2.ProductFirestoreRepository(firestore.firestore);
1696
+ return new i1$1.ProductFirestoreRepository(firestore.firestore);
1649
1697
  },
1650
- deps: [i1$1.AngularFirestore],
1698
+ deps: [i1$2.AngularFirestore],
1651
1699
  },
1652
1700
  {
1653
1701
  provide: 'SubscriptionPaymentRepository',
1654
1702
  useFactory: function (firestore, subscriptionRepository) {
1655
- return new i2.SubscriptionPaymentFirestoreRepository(firestore.firestore, subscriptionRepository);
1703
+ return new i1$1.SubscriptionPaymentFirestoreRepository(firestore.firestore, subscriptionRepository);
1656
1704
  },
1657
- deps: [i1$1.AngularFirestore, 'SubscriptionRepository'],
1705
+ deps: [i1$2.AngularFirestore, 'SubscriptionRepository'],
1658
1706
  },
1659
1707
  {
1660
1708
  provide: 'SubscriptionPlanRepository',
1661
1709
  useFactory: function (firestore) {
1662
- return new i2.SubscriptionPlanFirestoreRepository(firestore.firestore);
1710
+ return new i1$1.SubscriptionPlanFirestoreRepository(firestore.firestore);
1663
1711
  },
1664
- deps: [i1$1.AngularFirestore],
1712
+ deps: [i1$2.AngularFirestore],
1665
1713
  },
1666
1714
  {
1667
1715
  provide: 'SubscriptionProductRepository',
1668
1716
  useFactory: function (firestore) {
1669
- return new i2.SubscriptionProductFirestoreRepository(firestore.firestore);
1717
+ return new i1$1.SubscriptionProductFirestoreRepository(firestore.firestore);
1670
1718
  },
1671
- deps: [i1$1.AngularFirestore],
1719
+ deps: [i1$2.AngularFirestore],
1672
1720
  },
1673
1721
  {
1674
1722
  provide: 'SubscriptionRepository',
1675
1723
  useFactory: function (firestore) {
1676
- return new i2.SubscriptionFirestoreRepository(firestore.firestore);
1724
+ return new i1$1.SubscriptionFirestoreRepository(firestore.firestore);
1677
1725
  },
1678
- deps: [i1$1.AngularFirestore],
1726
+ deps: [i1$2.AngularFirestore],
1679
1727
  },
1680
1728
  {
1681
1729
  provide: 'UserRepository',
1682
1730
  useFactory: function (firestore) {
1683
- return new i2.UserFirestoreRepository(firestore.firestore);
1731
+ return new i1$1.UserFirestoreRepository(firestore.firestore);
1684
1732
  },
1685
- deps: [i1$1.AngularFirestore],
1733
+ deps: [i1$2.AngularFirestore],
1686
1734
  },
1687
1735
  {
1688
1736
  provide: 'UserAddressRepository',
1689
1737
  useFactory: function (firestore, userRepository) {
1690
- return new i2.UserAddressFirestoreRepository(firestore.firestore, userRepository);
1738
+ return new i1$1.UserAddressFirestoreRepository(firestore.firestore, userRepository);
1691
1739
  },
1692
- deps: [i1$1.AngularFirestore, 'UserRepository'],
1740
+ deps: [i1$2.AngularFirestore, 'UserRepository'],
1693
1741
  },
1694
1742
  {
1695
1743
  provide: 'UserPaymentMethodRepository',
1696
1744
  useFactory: function (firestore, userRepository) {
1697
- return new i2.UserPaymentMethodFirestoreRepository(firestore.firestore, userRepository);
1745
+ return new i1$1.UserPaymentMethodFirestoreRepository(firestore.firestore, userRepository);
1698
1746
  },
1699
- deps: [i1$1.AngularFirestore, 'UserRepository'],
1747
+ deps: [i1$2.AngularFirestore, 'UserRepository'],
1700
1748
  },
1701
1749
  {
1702
- provide: i2.ProductVariantFirestoreRepository,
1750
+ provide: i1$1.ProductVariantFirestoreRepository,
1703
1751
  useFactory: function (firestore, productRepository) {
1704
- return new i2.ProductVariantFirestoreRepository(firestore.firestore, productRepository);
1752
+ return new i1$1.ProductVariantFirestoreRepository(firestore.firestore, productRepository);
1705
1753
  },
1706
- deps: [i1$1.AngularFirestore, i2.ProductFirestoreRepository],
1754
+ deps: [i1$2.AngularFirestore, i1$1.ProductFirestoreRepository],
1707
1755
  },
1708
1756
  {
1709
1757
  provide: i0.APP_INITIALIZER,
1710
1758
  useFactory: function (firestore) { return function () { return firestore.firestore.settings({ ignoreUndefinedProperties: true }); }; },
1711
- deps: [i1$1.AngularFirestore],
1759
+ deps: [i1$2.AngularFirestore],
1712
1760
  multi: true,
1713
1761
  },
1714
1762
  ],
@@ -1731,34 +1779,34 @@
1731
1779
  AngularHasuraGraphQLModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: AngularHasuraGraphQLModule, providers: [
1732
1780
  {
1733
1781
  provide: 'CategoryRepository',
1734
- useExisting: i2.CategoryHasuraGraphQLRepository,
1782
+ useExisting: i1$1.CategoryHasuraGraphQLRepository,
1735
1783
  },
1736
1784
  {
1737
- provide: i2.CategoryHasuraGraphQLRepository,
1785
+ provide: i1$1.CategoryHasuraGraphQLRepository,
1738
1786
  useFactory: function (options, productRepository) {
1739
- return new i2.CategoryHasuraGraphQLRepository(options.endpoint, options.credentials, productRepository);
1787
+ return new i1$1.CategoryHasuraGraphQLRepository(options.endpoint, options.credentials, productRepository);
1740
1788
  },
1741
- deps: [HASURA_OPTIONS, i2.ProductHasuraGraphQLRepository],
1789
+ deps: [HASURA_OPTIONS, i1$1.ProductHasuraGraphQLRepository],
1742
1790
  },
1743
1791
  {
1744
1792
  provide: 'ProductRepository',
1745
- useExisting: i2.ProductHasuraGraphQLRepository,
1793
+ useExisting: i1$1.ProductHasuraGraphQLRepository,
1746
1794
  },
1747
1795
  {
1748
- provide: i2.ProductHasuraGraphQLRepository,
1796
+ provide: i1$1.ProductHasuraGraphQLRepository,
1749
1797
  useFactory: function (options) {
1750
- return new i2.ProductHasuraGraphQLRepository(options.endpoint, options.credentials);
1798
+ return new i1$1.ProductHasuraGraphQLRepository(options.endpoint, options.credentials);
1751
1799
  },
1752
1800
  deps: [HASURA_OPTIONS],
1753
1801
  },
1754
1802
  {
1755
1803
  provide: 'VariantRepository',
1756
- useExisting: i2.VariantHasuraGraphQLRepository,
1804
+ useExisting: i1$1.VariantHasuraGraphQLRepository,
1757
1805
  },
1758
1806
  {
1759
- provide: i2.VariantHasuraGraphQLRepository,
1807
+ provide: i1$1.VariantHasuraGraphQLRepository,
1760
1808
  useFactory: function (options) {
1761
- return new i2.VariantHasuraGraphQLRepository(options.endpoint, options.credentials);
1809
+ return new i1$1.VariantHasuraGraphQLRepository(options.endpoint, options.credentials);
1762
1810
  },
1763
1811
  deps: [HASURA_OPTIONS],
1764
1812
  },
@@ -1769,34 +1817,34 @@
1769
1817
  providers: [
1770
1818
  {
1771
1819
  provide: 'CategoryRepository',
1772
- useExisting: i2.CategoryHasuraGraphQLRepository,
1820
+ useExisting: i1$1.CategoryHasuraGraphQLRepository,
1773
1821
  },
1774
1822
  {
1775
- provide: i2.CategoryHasuraGraphQLRepository,
1823
+ provide: i1$1.CategoryHasuraGraphQLRepository,
1776
1824
  useFactory: function (options, productRepository) {
1777
- return new i2.CategoryHasuraGraphQLRepository(options.endpoint, options.credentials, productRepository);
1825
+ return new i1$1.CategoryHasuraGraphQLRepository(options.endpoint, options.credentials, productRepository);
1778
1826
  },
1779
- deps: [HASURA_OPTIONS, i2.ProductHasuraGraphQLRepository],
1827
+ deps: [HASURA_OPTIONS, i1$1.ProductHasuraGraphQLRepository],
1780
1828
  },
1781
1829
  {
1782
1830
  provide: 'ProductRepository',
1783
- useExisting: i2.ProductHasuraGraphQLRepository,
1831
+ useExisting: i1$1.ProductHasuraGraphQLRepository,
1784
1832
  },
1785
1833
  {
1786
- provide: i2.ProductHasuraGraphQLRepository,
1834
+ provide: i1$1.ProductHasuraGraphQLRepository,
1787
1835
  useFactory: function (options) {
1788
- return new i2.ProductHasuraGraphQLRepository(options.endpoint, options.credentials);
1836
+ return new i1$1.ProductHasuraGraphQLRepository(options.endpoint, options.credentials);
1789
1837
  },
1790
1838
  deps: [HASURA_OPTIONS],
1791
1839
  },
1792
1840
  {
1793
1841
  provide: 'VariantRepository',
1794
- useExisting: i2.VariantHasuraGraphQLRepository,
1842
+ useExisting: i1$1.VariantHasuraGraphQLRepository,
1795
1843
  },
1796
1844
  {
1797
- provide: i2.VariantHasuraGraphQLRepository,
1845
+ provide: i1$1.VariantHasuraGraphQLRepository,
1798
1846
  useFactory: function (options) {
1799
- return new i2.VariantHasuraGraphQLRepository(options.endpoint, options.credentials);
1847
+ return new i1$1.VariantHasuraGraphQLRepository(options.endpoint, options.credentials);
1800
1848
  },
1801
1849
  deps: [HASURA_OPTIONS],
1802
1850
  },
@@ -1810,7 +1858,7 @@
1810
1858
  AngularConnectModule.initializeApp = function (defaultShop, options, nameOrConfig) {
1811
1859
  return {
1812
1860
  ngModule: AngularConnectModule,
1813
- providers: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((i2.isNil(defaultShop) ? [] : [{ provide: DEFAULT_SHOP, useValue: defaultShop }]))), __read((i2.isNil(options === null || options === void 0 ? void 0 : options.firebase) ? [] : [{ provide: fire.FIREBASE_OPTIONS, useValue: options === null || options === void 0 ? void 0 : options.firebase }]))), __read((i2.isNil(options === null || options === void 0 ? void 0 : options.firebase) ? [] : [{ provide: fire.FIREBASE_APP_NAME, useValue: nameOrConfig }]))), __read((i2.isNil(options === null || options === void 0 ? void 0 : options.elasticSearch) ? [] : [{ provide: ES_CONFIG, useValue: options.elasticSearch }]))), __read((i2.isNil(options === null || options === void 0 ? void 0 : options.hasura) ? [] : [{ provide: HASURA_OPTIONS, useValue: options.hasura }]))),
1861
+ providers: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((i1$1.isNil(defaultShop) ? [] : [{ provide: DEFAULT_SHOP, useValue: defaultShop }]))), __read((i1$1.isNil(options === null || options === void 0 ? void 0 : options.firebase) ? [] : [{ provide: fire.FIREBASE_OPTIONS, useValue: options === null || options === void 0 ? void 0 : options.firebase }]))), __read((i1$1.isNil(options === null || options === void 0 ? void 0 : options.firebase) ? [] : [{ provide: fire.FIREBASE_APP_NAME, useValue: nameOrConfig }]))), __read((i1$1.isNil(options === null || options === void 0 ? void 0 : options.elasticSearch) ? [] : [{ provide: ES_CONFIG, useValue: options.elasticSearch }]))), __read((i1$1.isNil(options === null || options === void 0 ? void 0 : options.hasura) ? [] : [{ provide: HASURA_OPTIONS, useValue: options.hasura }]))), __read((i1$1.isNil(options === null || options === void 0 ? void 0 : options.apiUrl) ? [] : [{ provide: API_URL, useValue: options.apiUrl }]))),
1814
1862
  };
1815
1863
  };
1816
1864
  return AngularConnectModule;
@@ -1825,6 +1873,7 @@
1825
1873
  CouponService,
1826
1874
  HomeShopService,
1827
1875
  OrderService,
1876
+ ShippingService
1828
1877
  ], imports: [[fire.AngularFireModule, AngularFirestoreModule, AngularHasuraGraphQLModule]] });
1829
1878
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: AngularConnectModule, decorators: [{
1830
1879
  type: i0.NgModule,
@@ -1838,6 +1887,7 @@
1838
1887
  CouponService,
1839
1888
  HomeShopService,
1840
1889
  OrderService,
1890
+ ShippingService
1841
1891
  ],
1842
1892
  }]
1843
1893
  }] });
@@ -1857,6 +1907,7 @@
1857
1907
  exports.CouponService = CouponService;
1858
1908
  exports.HomeShopService = HomeShopService;
1859
1909
  exports.OrderService = OrderService;
1910
+ exports.ShippingService = ShippingService;
1860
1911
 
1861
1912
  Object.defineProperty(exports, '__esModule', { value: true });
1862
1913