@pelcro/react-pelcro-js 4.0.0-alpha.35 → 4.0.0-alpha.37

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/index.esm.js CHANGED
@@ -3423,7 +3423,8 @@ var labels$10 = {
3423
3423
  removeCoupon: "REMOVE",
3424
3424
  firstName: "First name",
3425
3425
  lastName: "Last name",
3426
- phone: "Phone"
3426
+ phone: "Phone",
3427
+ freeItems: "Free Items"
3427
3428
  };
3428
3429
  var checkoutForm_en = {
3429
3430
  messages: messages$14,
@@ -3967,7 +3968,8 @@ var labels$T = {
3967
3968
  var buttons$g = {
3968
3969
  next: "Next",
3969
3970
  select: "Select",
3970
- back: "Back"
3971
+ back: "Back",
3972
+ gift: "Gift"
3971
3973
  };
3972
3974
  var select_en = {
3973
3975
  messages: messages$V,
@@ -4367,7 +4369,8 @@ var labels$H = {
4367
4369
  removeCoupon: "RETIRER",
4368
4370
  firstName: "Prénom",
4369
4371
  lastName: "Nom de famille",
4370
- phone: "Téléphoner"
4372
+ phone: "Téléphoner",
4373
+ freeItems: "Articles gratuits"
4371
4374
  };
4372
4375
  var checkoutForm_fr = {
4373
4376
  messages: messages$M,
@@ -4912,7 +4915,8 @@ var labels$y = {
4912
4915
  var buttons$b = {
4913
4916
  next: "Prochain",
4914
4917
  select: "Choisir",
4915
- back: "Retour"
4918
+ back: "Retour",
4919
+ gift: "cadeau"
4916
4920
  };
4917
4921
  var select_fr = {
4918
4922
  messages: messages$B,
@@ -5258,7 +5262,8 @@ var labels$s = {
5258
5262
  removeCoupon: "제거",
5259
5263
  firstName: "이름",
5260
5264
  lastName: "성",
5261
- phone: "핸드폰"
5265
+ phone: "핸드폰",
5266
+ freeItems: "무료 아이템"
5262
5267
  };
5263
5268
  var checkoutForm_ko = {
5264
5269
  messages: messages$v,
@@ -5912,7 +5917,8 @@ var labels$j = {
5912
5917
  var buttons$6 = {
5913
5918
  next: "다음",
5914
5919
  select: "선택",
5915
- back: "뒤로"
5920
+ back: "뒤로",
5921
+ gift: "선물"
5916
5922
  };
5917
5923
  var select_ko = {
5918
5924
  messages: messages$k,
@@ -6198,7 +6204,8 @@ var labels$d = {
6198
6204
  removeCoupon: "ELIMINAR",
6199
6205
  firstName: "Nombre",
6200
6206
  lastName: "Apellido",
6201
- phone: "Teléfono"
6207
+ phone: "Teléfono",
6208
+ freeItems: "Artículos gratis"
6202
6209
  };
6203
6210
  var checkoutForm_es = {
6204
6211
  messages: messages$e,
@@ -6733,7 +6740,8 @@ var labels$4 = {
6733
6740
  var buttons$1 = {
6734
6741
  next: "Siguiente",
6735
6742
  select: "Seleccionar",
6736
- back: "Volver"
6743
+ back: "Volver",
6744
+ gift: "regalo"
6737
6745
  };
6738
6746
  var select_es = {
6739
6747
  messages: messages$3,
@@ -8835,7 +8843,7 @@ const calcAndFormatItemsTotal = (items, currency) => {
8835
8843
  let totalWithoutDividingBy100 = 0;
8836
8844
 
8837
8845
  for (const item of items) {
8838
- totalWithoutDividingBy100 += parseFloat(item.price ? isCurrencyZeroDecimal(currency) ? item.price * item.quantity : (item.price * item.quantity).toFixed(2) : isCurrencyZeroDecimal(currency) ? item.amount : item.amount.toFixed(2));
8846
+ totalWithoutDividingBy100 += parseFloat(item !== null && item !== void 0 && item.price || (item === null || item === void 0 ? void 0 : item.price) === 0 ? isCurrencyZeroDecimal(currency) ? item.price * item.quantity : (item.price * item.quantity).toFixed(2) : isCurrencyZeroDecimal(currency) ? item.amount : item.amount.toFixed(2));
8839
8847
  }
8840
8848
 
8841
8849
  return getFormattedPriceByLocal(totalWithoutDividingBy100, currency, getPageOrDefaultLanguage());
@@ -11448,6 +11456,10 @@ const initViewFromURL = () => {
11448
11456
  return showSubscriptionManageMembersFromUrl();
11449
11457
  }
11450
11458
 
11459
+ if (view === "payment-method-update") {
11460
+ return showPaymentMethodUpdateFromUrl();
11461
+ }
11462
+
11451
11463
  switchView(view);
11452
11464
  });
11453
11465
  }
@@ -11683,6 +11695,47 @@ const showPasswordlessRequestFromUrl = () => {
11683
11695
  return switchView("passwordless-request");
11684
11696
  };
11685
11697
 
11698
+ const showPaymentMethodUpdateFromUrl = () => {
11699
+ const {
11700
+ isAuthenticated,
11701
+ whenSiteReady,
11702
+ whenUserReady,
11703
+ switchView
11704
+ } = usePelcro.getStore();
11705
+ whenSiteReady(() => {
11706
+ if (!isAuthenticated()) {
11707
+ return switchView("login");
11708
+ }
11709
+
11710
+ whenUserReady(() => {
11711
+ const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_gateway_settings);
11712
+ const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
11713
+
11714
+ if (!window.Stripe && !supportsVantiv && !supportsTap) {
11715
+ document.querySelector('script[src="https://js.stripe.com/v3"]').addEventListener("load", () => {
11716
+ return switchView("payment-method-update");
11717
+ });
11718
+ return;
11719
+ } //vantiv
11720
+
11721
+
11722
+ if (supportsVantiv) {
11723
+ document.querySelector("#vantiv-eprotect-sdk").addEventListener("load", () => {
11724
+ return switchView("payment-method-update");
11725
+ });
11726
+ return;
11727
+ } //Tap
11728
+
11729
+
11730
+ if (supportsTap && document.querySelector("#tap-sdk")) {
11731
+ return switchView("payment-method-update");
11732
+ }
11733
+
11734
+ return switchView("payment-method-update");
11735
+ });
11736
+ });
11737
+ };
11738
+
11686
11739
  const showInvoiceDetailsFromUrl = () => {
11687
11740
  const {
11688
11741
  isAuthenticated,
@@ -13640,7 +13693,7 @@ function LoginModal({
13640
13693
 
13641
13694
  resetView();
13642
13695
  const viewFromURL = getStableViewID(window.Pelcro.helpers.getURLParameter("view"));
13643
- const viewsURLs = ["invoice-details", "gift-redeem", "plan-select"];
13696
+ const viewsURLs = ["invoice-details", "gift-redeem", "plan-select", "payment-method-update"];
13644
13697
 
13645
13698
  if (viewsURLs.includes(viewFromURL)) {
13646
13699
  initViewFromURL();
@@ -18832,7 +18885,8 @@ function SvgArrowThinLeft(props) {
18832
18885
 
18833
18886
  const NextArrow = ({
18834
18887
  onClick,
18835
- className
18888
+ className,
18889
+ size = "normal"
18836
18890
  }) => /*#__PURE__*/React__default.createElement("button", {
18837
18891
  className: `sm:plc-flex plc-hidden plc-text-gray-500 plc-w-11 plc-h-11 plc-items-center plc-justify-center plc-rounded-full plc-text-sm plc-absolute plc-top-1/2 plc--right-12 plc-transform plc--translate-y-1/2 hover:plc-text-gray-900 ${className}`,
18838
18892
  onClick: onClick
@@ -18840,12 +18894,13 @@ const NextArrow = ({
18840
18894
  stroke: "currentColor",
18841
18895
  "aria-hidden": "true",
18842
18896
  focusable: "false",
18843
- className: "plc-h-7 plc-w-7"
18897
+ className: `${size === "normal" ? "plc-w-7 plc-h-7" : size === "small" ? "plc-w-4 plc-h-4" : "plc-w-9 plc-h-9"}`
18844
18898
  }));
18845
18899
 
18846
18900
  const PrevArrow = ({
18847
18901
  onClick,
18848
- className
18902
+ className,
18903
+ size = "normal"
18849
18904
  }) => /*#__PURE__*/React__default.createElement("button", {
18850
18905
  className: `sm:plc-flex plc-hidden plc-text-gray-500 plc-w-11 plc-h-11 plc-items-center plc-justify-center plc-rounded-full plc-text-sm plc-absolute plc-top-1/2 plc--left-12 plc-transform plc--translate-y-1/2 hover:plc-text-gray-900 ${className}`,
18851
18906
  onClick: onClick
@@ -18853,28 +18908,40 @@ const PrevArrow = ({
18853
18908
  stroke: "currentColor",
18854
18909
  "aria-hidden": "true",
18855
18910
  focusable: "false",
18856
- className: "plc-h-7 plc-w-7"
18911
+ className: `${size === "normal" ? "plc-w-7 plc-h-7" : size === "small" ? "plc-w-4 plc-h-4" : "plc-w-9 plc-h-9"}`
18857
18912
  }));
18858
18913
 
18859
18914
  function Carousel({
18860
18915
  slidesToShow = 3,
18861
18916
  slidesToScroll = 1,
18917
+ initialSlide = 0,
18918
+ dots = true,
18862
18919
  slidesCount,
18920
+ arrowsSize = "normal",
18921
+ paddingSize = "small",
18863
18922
  children,
18864
18923
  ...otherProps
18865
18924
  }) {
18866
18925
  const ref = useRef(null);
18926
+ useEffect(() => {
18927
+ ref.current.slickGoTo(initialSlide, true);
18928
+ }, [initialSlide]);
18867
18929
  const settings = {
18868
18930
  dots: true,
18869
18931
  infinite: false,
18870
18932
  speed: 200,
18871
18933
  slidesToShow: slidesToShow,
18872
18934
  slidesToScroll: slidesToScroll,
18873
- nextArrow: /*#__PURE__*/React__default.createElement(NextArrow, null),
18874
- prevArrow: /*#__PURE__*/React__default.createElement(PrevArrow, null),
18875
- initialSlide: 0,
18935
+ nextArrow: /*#__PURE__*/React__default.createElement(NextArrow, {
18936
+ size: arrowsSize
18937
+ }),
18938
+ prevArrow: /*#__PURE__*/React__default.createElement(PrevArrow, {
18939
+ size: arrowsSize
18940
+ }),
18941
+ initialSlide: initialSlide,
18942
+ dots: dots,
18876
18943
  customPaging: i => /*#__PURE__*/React__default.createElement("span", {
18877
- className: "plc-w-3 plc-h-3 plc-rounded-full plc-transition-all plc-bg-gray-400 plc-inline-flex plc-cursor-pointer hover:plc-opacity-30"
18944
+ className: "plc-w-3 plc-h-3 plc-rounded-full plc-transition-all plc-bg-gray-400 plc-inline-flex plc-cursor-pointer hover:plc-bg-primary"
18878
18945
  }),
18879
18946
  responsive: [{
18880
18947
  breakpoint: 1280,
@@ -18889,7 +18956,7 @@ function Carousel({
18889
18956
  }]
18890
18957
  };
18891
18958
  return /*#__PURE__*/React__default.createElement("div", {
18892
- className: "carousel-wrapper plc-relative sm:plc-px-8 plc-px-0"
18959
+ className: `carousel-wrapper plc-relative ${paddingSize === "small" ? "sm:plc-px-8 plc-px-0" : paddingSize === "medium" ? "sm:plc-px-10 plc-px-0" : "sm:plc-px-14 plc-px-0"}`
18893
18960
  }, /*#__PURE__*/React__default.createElement(Slider, Object.assign({
18894
18961
  ref: ref
18895
18962
  }, settings), children));
@@ -18955,6 +19022,29 @@ function SelectModalWithHook(props) {
18955
19022
  matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
18956
19023
  });
18957
19024
  }
19025
+
19026
+ function productsWithMatchedTaggedFirst() {
19027
+ var _window$Pelcro$produc;
19028
+
19029
+ const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
19030
+ const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
19031
+ const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
19032
+ return [productsThatMatchArticleTag, allProductsMinusMatched];
19033
+ }
19034
+
19035
+ function productMatchPageLanguage(product) {
19036
+ if (!product) {
19037
+ return false;
19038
+ }
19039
+
19040
+ if (product.language === null) {
19041
+ return true;
19042
+ }
19043
+
19044
+ const siteLanguage = window.Pelcro.helpers.getHtmlLanguageAttribute();
19045
+ return product.language === siteLanguage;
19046
+ }
19047
+
18958
19048
  SelectModalWithHook.viewId = "plan-select";
18959
19049
 
18960
19050
  class SelectModal extends Component {
@@ -18999,19 +19089,50 @@ class SelectModal extends Component {
18999
19089
  document.addEventListener("keydown", this.handleSubmit);
19000
19090
 
19001
19091
  if (!document.querySelector("#pelcro-selection-view") || !document.querySelector(".pelcro-select-product-wrapper")) {
19092
+ var _window$Pelcro, _window$Pelcro$user, _window$Pelcro2, _window$Pelcro2$user, _window$Pelcro3, _window$Pelcro3$user, _window$Pelcro4, _window$Pelcro4$site;
19093
+
19094
+ const userCurrency = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$user = _window$Pelcro.user) === null || _window$Pelcro$user === void 0 ? void 0 : _window$Pelcro$user.read().currency;
19095
+ const userCountry = (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$user = _window$Pelcro2.user) === null || _window$Pelcro2$user === void 0 ? void 0 : _window$Pelcro2$user.location.countryCode;
19096
+ const userLanguage = (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$user = _window$Pelcro3.user) === null || _window$Pelcro3$user === void 0 ? void 0 : _window$Pelcro3$user.read().language;
19097
+ const productsMatchingUserCurrency = (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : (_window$Pelcro4$site = _window$Pelcro4.site) === null || _window$Pelcro4$site === void 0 ? void 0 : _window$Pelcro4$site.read().products.filter(product => {
19098
+ const filteredPlans = product.plans.filter(plan => plan.currency === userCurrency || !userCurrency);
19099
+ if (filteredPlans.length) return filteredPlans;
19100
+ });
19101
+ const productsMatchingUserCountry = productsMatchingUserCurrency.filter(product => {
19102
+ const filteredPlans = product.plans.filter(plan => {
19103
+ var _plan$countries;
19104
+
19105
+ return plan.countries && ((_plan$countries = plan.countries) === null || _plan$countries === void 0 ? void 0 : _plan$countries.includes(userCountry)) || !plan.countries || !plan.countries.length;
19106
+ });
19107
+ if (filteredPlans.length) return filteredPlans;
19108
+ });
19002
19109
  notifyBugsnag(() => {
19003
19110
  Bugsnag.notify("SelectModal - No data viewed", event => {
19004
- var _window$Pelcro, _window$Pelcro$site, _window$Pelcro2, _window$Pelcro2$user, _window$Pelcro3, _window$Pelcro3$uiSet, _window$Pelcro4;
19111
+ var _window$Pelcro5, _window$Pelcro5$site, _window$Pelcro6, _window$Pelcro6$user, _window$Pelcro7, _window$Pelcro7$uiSet, _window$Pelcro8, _this$props, _window$Pelcro9, _window$Pelcro9$helpe, _window$Pelcro10, _window$Pelcro10$site;
19005
19112
 
19006
19113
  event.addMetadata("MetaData", {
19007
- site: (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$site = _window$Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : _window$Pelcro$site.read(),
19008
- user: (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$user = _window$Pelcro2.user) === null || _window$Pelcro2$user === void 0 ? void 0 : _window$Pelcro2$user.read(),
19009
- uiVersion: (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$uiSet = _window$Pelcro3.uiSettings) === null || _window$Pelcro3$uiSet === void 0 ? void 0 : _window$Pelcro3$uiSet.uiVersion,
19010
- environment: (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : _window$Pelcro4.environment
19114
+ site: (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : (_window$Pelcro5$site = _window$Pelcro5.site) === null || _window$Pelcro5$site === void 0 ? void 0 : _window$Pelcro5$site.read(),
19115
+ user: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$user = _window$Pelcro6.user) === null || _window$Pelcro6$user === void 0 ? void 0 : _window$Pelcro6$user.read(),
19116
+ uiVersion: (_window$Pelcro7 = window.Pelcro) === null || _window$Pelcro7 === void 0 ? void 0 : (_window$Pelcro7$uiSet = _window$Pelcro7.uiSettings) === null || _window$Pelcro7$uiSet === void 0 ? void 0 : _window$Pelcro7$uiSet.uiVersion,
19117
+ environment: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : _window$Pelcro8.environment,
19118
+ matchingEntitlementsProps: (_this$props = this.props) === null || _this$props === void 0 ? void 0 : _this$props.matchingEntitlements,
19119
+ productListState: this.state.productList,
19120
+ methods: {
19121
+ productsWithMatchedTaggedFirst: productsWithMatchedTaggedFirst(),
19122
+ pelcroSDKProductsListMethod: window.Pelcro.product.list(),
19123
+ pelcroSDKGetByEntitlements: this.props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(this.props.matchingEntitlements) : null
19124
+ },
19125
+ userCurrency: userCurrency,
19126
+ userCountry: userCountry,
19127
+ userLanguage: userLanguage,
19128
+ siteLanguage: (_window$Pelcro9 = window.Pelcro) === null || _window$Pelcro9 === void 0 ? void 0 : (_window$Pelcro9$helpe = _window$Pelcro9.helpers) === null || _window$Pelcro9$helpe === void 0 ? void 0 : _window$Pelcro9$helpe.getHtmlLanguageAttribute(),
19129
+ products: (_window$Pelcro10 = window.Pelcro) === null || _window$Pelcro10 === void 0 ? void 0 : (_window$Pelcro10$site = _window$Pelcro10.site) === null || _window$Pelcro10$site === void 0 ? void 0 : _window$Pelcro10$site.read().products.length,
19130
+ currency_matching_filter: `${productsMatchingUserCurrency.length} Products Passed`,
19131
+ country_matching_filter: `${productsMatchingUserCountry.length} Products Passed`,
19132
+ language_matching_filter: `${productsMatchingUserCountry.filter(productMatchPageLanguage).length} Products Passed`
19011
19133
  });
19012
19134
  });
19013
19135
  });
19014
- console.log("bugsnag Triggered");
19015
19136
  }
19016
19137
  });
19017
19138
 
@@ -19092,7 +19213,7 @@ class SelectModal extends Component {
19092
19213
  onClick: productButtonCallback,
19093
19214
  "data-key": product.id,
19094
19215
  id: "pelcro-select-product-back-button",
19095
- className: `plc-w-full ${options !== null && options !== void 0 && options.emphasize ? "plc-bg-primary-700" : ""}`
19216
+ className: `plc-w-full plc-capitalize plc-border-2 plc-border-primary hover:plc-bg-white hover:plc-text-primary plc-transition-all focus:plc-outline-none ${options !== null && options !== void 0 && options.emphasize ? "plc-bg-primary-700" : ""}`
19096
19217
  }, index === 0 && {
19097
19218
  autoFocus: true
19098
19219
  }), productButtonLabel)));
@@ -19113,38 +19234,83 @@ class SelectModal extends Component {
19113
19234
  }, items);
19114
19235
  });
19115
19236
 
19237
+ _defineProperty$3(this, "handleScrollLeft", () => {
19238
+ this.productsTabRef.current.scrollLeft -= 100; // Adjust the scroll value as needed
19239
+ });
19240
+
19241
+ _defineProperty$3(this, "handleScrollRight", () => {
19242
+ this.productsTabRef.current.scrollLeft += 100; // Adjust the scroll value as needed
19243
+ });
19244
+
19245
+ _defineProperty$3(this, "toggleProdDescExpanded", () => {
19246
+ this.setState({
19247
+ prodDescExpanded: !this.state.prodDescExpanded
19248
+ });
19249
+ });
19250
+
19116
19251
  _defineProperty$3(this, "renderProductTabs", () => {
19117
- const productButtonCallback = this.selectProduct;
19252
+ const {
19253
+ prodDescExpanded
19254
+ } = this.state;
19255
+
19256
+ const productButtonCallback = e => {
19257
+ this.setState({
19258
+ scrollToTab: false
19259
+ });
19260
+ this.selectProduct(e);
19261
+ };
19262
+
19118
19263
  const {
19119
19264
  image,
19120
19265
  description
19121
19266
  } = this.state.product;
19122
- return /*#__PURE__*/React__default.createElement("div", {
19123
- className: "productTabs plc-flex plc-flex-col plc-items-center"
19124
- }, /*#__PURE__*/React__default.createElement("ul", {
19125
- className: "tabs plc-w-full plc-flex plc-items-center plc-text-center plc-border-b plc-border-gray-300 plc-mb-4 plc-overflow-x-auto"
19126
- }, this.state.productList.map((product, index) => {
19127
- var _this$state$product;
19128
-
19129
- return /*#__PURE__*/React__default.createElement("li", {
19130
- key: product.id,
19131
- id: `${product.id === ((_this$state$product = this.state.product) === null || _this$state$product === void 0 ? void 0 : _this$state$product.id) ? "activeTab" : ""}`,
19132
- className: "plc-relative plc-mx-1"
19267
+ const tabs = this.state.productList.map((product, index) => {
19268
+ if (product.id === this.state.product.id && this.state.scrollToTab) {
19269
+ this.setState(oldState => {
19270
+ if (+oldState.initialTabSlide !== +index) {
19271
+ return {
19272
+ initialTabSlide: index
19273
+ };
19274
+ }
19275
+ });
19276
+ }
19277
+
19278
+ return /*#__PURE__*/React__default.createElement("div", {
19279
+ key: product.id
19133
19280
  }, /*#__PURE__*/React__default.createElement("button", {
19134
- onClick: productButtonCallback,
19281
+ onClick: e => productButtonCallback(e),
19135
19282
  "data-key": product.id,
19136
- className: "plc-px-4 plc-py-2 plc-rounded plc-text-gray-600 focus:plc-outline-none plc-whitespace-nowrap"
19283
+ "data-index": index,
19284
+ className: `plc-px-4 plc-py-2 focus:plc-outline-none plc-border-b-4 hover:plc-text-primary hover:plc-border-primary plc-transition-all plc-h-full plc-flex ${product.id === this.state.product.id ? "plc-border-primary plc-text-primary" : "plc-border-transparent plc-font-normal plc-text-gray-500"}`
19137
19285
  }, product.name));
19138
- })), /*#__PURE__*/React__default.createElement("div", {
19139
- className: "selectedProduct plc-flex plc-flex-col plc-items-center plc-justify-center plc-max-w-3xl"
19286
+ });
19287
+ return /*#__PURE__*/React__default.createElement("div", {
19288
+ className: "plc-flex plc-flex-col"
19289
+ }, /*#__PURE__*/React__default.createElement("div", {
19290
+ className: "productTabs plc-relative plc-max-w-xl plc-mx-auto"
19291
+ }, /*#__PURE__*/React__default.createElement(Carousel, {
19292
+ slidesCount: tabs.length,
19293
+ initialSlide: this.state.initialTabSlide,
19294
+ dots: false,
19295
+ arrowsSize: "small"
19296
+ }, tabs)), /*#__PURE__*/React__default.createElement("div", {
19297
+ className: "selectedProduct plc-flex plc-flex-col plc-items-center plc-justify-center plc-max-w-3xl plc-mx-auto plc-mt-6"
19140
19298
  }, image && /*#__PURE__*/React__default.createElement("figure", {
19141
19299
  className: "plc-mb-2"
19142
19300
  }, /*#__PURE__*/React__default.createElement("img", {
19143
19301
  src: image,
19144
19302
  alt: "Product Image"
19145
- })), description && /*#__PURE__*/React__default.createElement("p", {
19146
- className: "plc-text-center"
19147
- }, description)));
19303
+ })), description && /*#__PURE__*/React__default.createElement("div", {
19304
+ className: "plc-max-w-xl plc-text-center"
19305
+ }, /*#__PURE__*/React__default.createElement("div", {
19306
+ className: `plc-overflow-x-hidden ${prodDescExpanded ? "plc-whitespace-normal" : "plc-whitespace-nowrap"}`
19307
+ }, prodDescExpanded ? /*#__PURE__*/React__default.createElement("span", null, description, " ", /*#__PURE__*/React__default.createElement("button", {
19308
+ onClick: this.toggleProdDescExpanded,
19309
+ className: "plc-text-primary plc-underline plc-cursor-pointer plc-outline-none focus:plc-outline-none hover:plc-no-underline"
19310
+ }, "Read less")) : /*#__PURE__*/React__default.createElement("span", null, description.slice(0, 50), " ", /*#__PURE__*/React__default.createElement("button", {
19311
+ onClick: this.toggleProdDescExpanded,
19312
+ className: "plc-text-primary plc-underline plc-cursor-pointer plc-outline-none focus:plc-outline-none hover:plc-no-underline"
19313
+ }, "Read more"))))));
19148
19314
  });
19149
19315
 
19150
19316
  _defineProperty$3(this, "renderMatchingProductsFirst", () => {
@@ -19169,34 +19335,22 @@ class SelectModal extends Component {
19169
19335
  }), /*#__PURE__*/React__default.createElement("h3", {
19170
19336
  className: "plc-text-sm plc-font-semibold"
19171
19337
  }, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
19172
-
19173
- function productsWithMatchedTaggedFirst() {
19174
- var _window$Pelcro$produc;
19175
-
19176
- const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
19177
- const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
19178
- const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
19179
- return [productsThatMatchArticleTag, allProductsMinusMatched];
19180
- }
19181
19338
  });
19182
19339
 
19183
19340
  _defineProperty$3(this, "renderPlans", () => {
19341
+ const {
19342
+ disableGifting
19343
+ } = this.props;
19184
19344
  const items = this.state.planList.map(plan => {
19185
- var _this$state, _this$state2;
19345
+ var _this$state;
19186
19346
 
19187
- const isChecked = this.state.plan.id === plan.id ? true : false;
19347
+ this.state.plan.id === plan.id ? true : false;
19188
19348
  return /*#__PURE__*/React__default.createElement("div", {
19189
19349
  key: plan.id,
19190
19350
  className: `${((_this$state = this.state) === null || _this$state === void 0 ? void 0 : _this$state.plan.id) === plan.id ? "plc-border-2 plc-border-primary" : "plc-border plc-border-gray-300"} plc-h-full plc-flex plc-flex-col plc-items-start plc-text-gray-900 plc-border-solid plc-rounded-md plc-bg-white pelcro-select-plan-wrapper`
19191
- }, /*#__PURE__*/React__default.createElement(Radio, {
19192
- wrapperClassName: "plc-w-full plc-flex plc-h-full",
19193
- className: "plc-hidden pelcro-select-plan-radio",
19194
- labelClassName: "plc-cursor-pointer plc-w-full plc-h-full plc-m-0 plc-flex-1 plc-flex plc-flex-col",
19195
- id: `pelcro-select-plan-${plan.id}`,
19196
- name: "plan",
19197
- checked: isChecked,
19198
- "data-key": plan.id,
19199
- onChange: this.selectPlan
19351
+ }, /*#__PURE__*/React__default.createElement("div", {
19352
+ className: "plc-w-full plc-flex plc-flex-col plc-h-full",
19353
+ id: `pelcro-select-plan-${plan.id}`
19200
19354
  }, /*#__PURE__*/React__default.createElement("div", {
19201
19355
  className: "plc-p-4 plc-text-center plc-flex plc-flex-col plc-justify-center plc-items-center plc-w-full"
19202
19356
  }, /*#__PURE__*/React__default.createElement("h4", {
@@ -19216,8 +19370,16 @@ class SelectModal extends Component {
19216
19370
  }, plan.currency), /*#__PURE__*/React__default.createElement("span", {
19217
19371
  className: "plc-capitalize"
19218
19372
  }, "/ ", plan.interval))), /*#__PURE__*/React__default.createElement("div", {
19219
- className: `${((_this$state2 = this.state) === null || _this$state2 === void 0 ? void 0 : _this$state2.plan.id) === plan.id ? "plc-bg-primary plc-text-white" : "plc-text-primary-800"} plc-flex plc-items-center plc-justify-center plc-text-center plc-py-2 plc-px-4 plc-w-full plc-border-2 plc-rounded-md plc-border-primary`
19220
- }, this.locale("buttons.select")))));
19373
+ className: `plc-grid ${disableGifting ? "plc-grid-cols-1" : "plc-grid-cols-2 plc-gap-2"}`
19374
+ }, /*#__PURE__*/React__default.createElement("button", {
19375
+ className: `plc-flex plc-items-center plc-justify-center plc-text-center plc-py-2 plc-px-4 plc-w-full plc-border-2 plc-rounded-md plc-border-primary focus:plc-outline-none plc-text-white plc-bg-primary hover:plc-bg-white hover:plc-text-primary plc-transition-all`,
19376
+ "data-key": plan.id,
19377
+ onClick: e => this.selectPlan(e, false)
19378
+ }, this.locale("buttons.select")), !disableGifting && /*#__PURE__*/React__default.createElement("button", {
19379
+ className: `plc-flex plc-items-center plc-justify-center plc-text-center plc-py-2 plc-px-4 plc-w-full plc-border-2 plc-rounded-md plc-border-primary focus:plc-outline-none plc-text-primary plc-bg-white hover:plc-bg-primary hover:plc-text-white plc-transition-all`,
19380
+ "data-key": plan.id,
19381
+ onClick: e => this.selectPlan(e, true)
19382
+ }, this.locale("buttons.gift"))))));
19221
19383
  });
19222
19384
  return /*#__PURE__*/React__default.createElement(Carousel, {
19223
19385
  slidesCount: items.length
@@ -19251,39 +19413,30 @@ class SelectModal extends Component {
19251
19413
  }
19252
19414
  });
19253
19415
 
19254
- _defineProperty$3(this, "selectPlan", e => {
19416
+ _defineProperty$3(this, "selectPlan", (e, isGift) => {
19255
19417
  const id = e.target.dataset.key;
19256
19418
 
19257
19419
  for (const plan of this.state.planList) {
19258
19420
  if (+plan.id === +id) {
19259
- plan.isCheked = true;
19260
19421
  this.setState({
19261
- plan: plan
19422
+ plan: plan,
19423
+ isGift: isGift
19262
19424
  });
19263
- this.setState({
19264
- disabled: false
19265
- });
19266
- } else {
19267
- plan.isCheked = false;
19425
+ this.props.setProductAndPlan(this.state.product, plan, isGift);
19426
+ this.submitOption(this.state.product, isGift);
19268
19427
  }
19269
19428
  }
19270
19429
  });
19271
19430
 
19272
19431
  _defineProperty$3(this, "goBack", () => {
19273
19432
  this.setState({
19274
- disabled: true
19275
- });
19276
- this.setState({
19277
- mode: "product"
19433
+ disabled: true,
19434
+ mode: "product",
19435
+ scrollToTab: true
19278
19436
  });
19279
19437
  });
19280
19438
 
19281
- _defineProperty$3(this, "submitOption", () => {
19282
- this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift);
19283
- const {
19284
- product,
19285
- isGift
19286
- } = this.state;
19439
+ _defineProperty$3(this, "submitOption", (product, isGift) => {
19287
19440
  const {
19288
19441
  setView
19289
19442
  } = this.props;
@@ -19318,31 +19471,20 @@ class SelectModal extends Component {
19318
19471
  isGift: props.isGift,
19319
19472
  disabled: true,
19320
19473
  mode: "product",
19474
+ initialTabSlide: 0,
19475
+ scrollToTab: true,
19476
+ prodDescExpanded: false,
19321
19477
  productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
19322
19478
  };
19323
19479
  this.product = this.props.product || window.Pelcro.paywall.getProduct();
19324
19480
  this.locale = this.props.t;
19325
19481
  this.closeButton = window.Pelcro.paywall.displayCloseButton();
19326
- }
19327
-
19328
- componentDidUpdate(prevProps, prevState) {
19329
- //Scroll to active tab
19330
- const activeElement = document.getElementById("activeTab");
19331
-
19332
- if (activeElement) {
19333
- activeElement.parentNode.scrollLeft = activeElement.offsetLeft - 80;
19334
- } else {
19335
- console.log(document.getElementById("activeTab"));
19336
- }
19482
+ this.productsTabRef = /*#__PURE__*/React__default.createRef();
19337
19483
  }
19338
19484
 
19339
19485
  render() {
19340
19486
  var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
19341
19487
 
19342
- const {
19343
- disableGifting
19344
- } = this.props;
19345
-
19346
19488
  if (this.state.mode === "product") {
19347
19489
  var _ReactGA$event;
19348
19490
 
@@ -19378,27 +19520,9 @@ class SelectModal extends Component {
19378
19520
  id: "pelcro-selection-view"
19379
19521
  }, /*#__PURE__*/React__default.createElement("div", {
19380
19522
  className: "pelcro-select-products-wrapper"
19381
- }, (_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.restrictive_paywall_metatags_enabled ? this.renderMatchingProductsFirst() : this.renderProducts()), this.state.mode === "plan" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
19523
+ }, (_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.restrictive_paywall_metatags_enabled ? this.renderMatchingProductsFirst() : this.renderProducts()), this.state.mode === "plan" && /*#__PURE__*/React__default.createElement("div", {
19382
19524
  className: "pelcro-select-plans-wrapper plc-mt-4"
19383
- }, this.renderPlans()), !disableGifting && /*#__PURE__*/React__default.createElement("div", {
19384
- className: "plc-flex plc-justify-center plc-mt-4"
19385
- }, /*#__PURE__*/React__default.createElement(Checkbox, {
19386
- onChange: this.onIsGiftChange,
19387
- checked: this.state.isGift,
19388
- id: "pelcro-input-is-gift"
19389
- }, this.locale("messages.checkbox"))), /*#__PURE__*/React__default.createElement(Button, {
19390
- disabled: this.state.disabled,
19391
- onClick: this.submitOption,
19392
- id: "pelcro-submit",
19393
- className: "plc-mt-2 plc-w-full plc-max-w-sm plc-ml-auto plc-mr-auto plc-block"
19394
- }, this.locale("buttons.next"))))), /*#__PURE__*/React__default.createElement(ModalFooter, null, !window.Pelcro.user.isAuthenticated() && /*#__PURE__*/React__default.createElement("p", {
19395
- className: "plc-mb-9"
19396
- }, /*#__PURE__*/React__default.createElement("span", {
19397
- className: "plc-font-medium"
19398
- }, this.locale("messages.alreadyHaveAccount") + " "), /*#__PURE__*/React__default.createElement(Link, {
19399
- id: "pelcro-link-login",
19400
- onClick: this.displayLoginView
19401
- }, this.locale("messages.loginHere")))));
19525
+ }, this.renderPlans()))), /*#__PURE__*/React__default.createElement(ModalFooter, null));
19402
19526
  }
19403
19527
 
19404
19528
  }
@@ -21511,6 +21635,8 @@ const PaymentMethodContainerWithoutStripe = ({
21511
21635
  }) => {
21512
21636
  var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isGift, _props$isRenewingGift, _props$invoice, _window$Pelcro, _window$Pelcro$uiSett;
21513
21637
 
21638
+ const [vantivPaymentRequest, setVantivPaymentRequest] = useState(null);
21639
+ const [updatedCouponCode, setUpdatedCouponCode] = useState("");
21514
21640
  const {
21515
21641
  t
21516
21642
  } = useTranslation("payment");
@@ -21554,7 +21680,7 @@ const PaymentMethodContainerWithoutStripe = ({
21554
21680
  }, []);
21555
21681
  /*====== Start Tap integration ========*/
21556
21682
 
21557
- const submitUsingTap = () => {
21683
+ const submitUsingTap = state => {
21558
21684
  var _ref, _ref2, _ref3, _state$updatedPrice;
21559
21685
 
21560
21686
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
@@ -21609,7 +21735,7 @@ const PaymentMethodContainerWithoutStripe = ({
21609
21735
  }
21610
21736
  });
21611
21737
  } else {
21612
- window.Pelcro.payment.authorize({
21738
+ window.Pelcro.payment.verify({
21613
21739
  auth_token: window.Pelcro.user.read().auth_token,
21614
21740
  first_name: window.Pelcro.user.read().first_name || state.firstName,
21615
21741
  last_name: window.Pelcro.user.read().last_name || state.lastName,
@@ -21618,7 +21744,8 @@ const PaymentMethodContainerWithoutStripe = ({
21618
21744
  amount: totalAmount,
21619
21745
  currency: (plan === null || plan === void 0 ? void 0 : plan.currency) || (invoice === null || invoice === void 0 ? void 0 : invoice.currency) || window.Pelcro.site.read().default_currency,
21620
21746
  tap_token: result.id,
21621
- redirect_url: `${window.Pelcro.environment.domain}/webhook/tap/callback/3dsecure?auth_token=${window.Pelcro.user.read().auth_token}`
21747
+ funding: result.card.funding,
21748
+ redirect_url: `${window.Pelcro.environment.domain}/webhook/tap/callback/3dsecure?auth_token=${window.Pelcro.user.read().auth_token}&type=verify_card&site_id=${window.Pelcro.siteid}`
21622
21749
  }, (err, res) => {
21623
21750
  if (err) {
21624
21751
  // Inform the user if there was an error
@@ -21659,7 +21786,7 @@ const PaymentMethodContainerWithoutStripe = ({
21659
21786
  content: null
21660
21787
  }
21661
21788
  });
21662
- handleTapPayment(tapID);
21789
+ handleTapPayment(tapID, state);
21663
21790
  }
21664
21791
  }; // listen to injected iframe for authentication complete message
21665
21792
 
@@ -21674,7 +21801,7 @@ const PaymentMethodContainerWithoutStripe = ({
21674
21801
  });
21675
21802
  };
21676
21803
 
21677
- function handleTapPayment(paymentRequest) {
21804
+ function handleTapPayment(paymentRequest, state) {
21678
21805
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
21679
21806
 
21680
21807
  if (type === "createPayment") {
@@ -21701,6 +21828,7 @@ const PaymentMethodContainerWithoutStripe = ({
21701
21828
  type: LOADING,
21702
21829
  payload: false
21703
21830
  });
21831
+ toggleAuthenticationSuccessPendingView(false);
21704
21832
 
21705
21833
  if (err) {
21706
21834
  onFailure(err);
@@ -21721,7 +21849,8 @@ const PaymentMethodContainerWithoutStripe = ({
21721
21849
  }
21722
21850
  });
21723
21851
  onSuccess(res);
21724
- });
21852
+ } //
21853
+ );
21725
21854
  }
21726
21855
 
21727
21856
  function handleTapSubscription() {
@@ -21856,7 +21985,7 @@ const PaymentMethodContainerWithoutStripe = ({
21856
21985
  /*====== End Tap integration ========*/
21857
21986
 
21858
21987
 
21859
- const submitUsingVantiv = () => {
21988
+ const submitUsingVantiv = state => {
21860
21989
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
21861
21990
 
21862
21991
  if (isUsingExistingPaymentMethod) {
@@ -21879,7 +22008,7 @@ const PaymentMethodContainerWithoutStripe = ({
21879
22008
  });
21880
22009
  };
21881
22010
 
21882
- function handleVantivPayment(paymentRequest) {
22011
+ function handleVantivPayment(paymentRequest, couponCode) {
21883
22012
  if (paymentRequest) {
21884
22013
  const SUCCESS_STATUS = "870";
21885
22014
 
@@ -21953,9 +22082,6 @@ const PaymentMethodContainerWithoutStripe = ({
21953
22082
  const renewSubscription = !isGift && subscriptionIdToRenew;
21954
22083
  const giftSubscriprition = isGift && !subscriptionIdToRenew;
21955
22084
  const renewGift = isRenewingGift;
21956
- const {
21957
- couponCode
21958
- } = state;
21959
22085
 
21960
22086
  if (renewGift) {
21961
22087
  return payment.execute({
@@ -22035,6 +22161,8 @@ const PaymentMethodContainerWithoutStripe = ({
22035
22161
  const tapInstanceRef = React__default.useRef(null);
22036
22162
  const tapInstanceCard = React__default.useRef(null);
22037
22163
  useEffect(() => {
22164
+ if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || props !== null && props !== void 0 && props.freeOrders)) return;
22165
+
22038
22166
  if (cardProcessor === "vantiv" && !selectedPaymentMethodId) {
22039
22167
  var _window$Pelcro$site$r2, _window$Pelcro$site$r3;
22040
22168
 
@@ -22047,7 +22175,7 @@ const PaymentMethodContainerWithoutStripe = ({
22047
22175
  height: "245",
22048
22176
  timeout: 50000,
22049
22177
  div: "eProtectiframe",
22050
- callback: handleVantivPayment,
22178
+ callback: paymentRequest => setVantivPaymentRequest(paymentRequest),
22051
22179
  showCvv: true,
22052
22180
  numYears: 8,
22053
22181
  placeholderText: {
@@ -22061,9 +22189,17 @@ const PaymentMethodContainerWithoutStripe = ({
22061
22189
  }
22062
22190
  });
22063
22191
  }
22064
- }, [selectedPaymentMethodId]);
22192
+ }, [selectedPaymentMethodId]); //Trigger the handleVantivPayment method when a vantivePaymentRequest is present
22193
+
22194
+ useEffect(() => {
22195
+ if (vantivPaymentRequest) {
22196
+ handleVantivPayment(vantivPaymentRequest, updatedCouponCode);
22197
+ }
22198
+ }, [vantivPaymentRequest]);
22065
22199
  useEffect(() => {
22066
22200
  whenUserReady(() => {
22201
+ if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || props !== null && props !== void 0 && props.freeOrders)) return;
22202
+
22067
22203
  if (cardProcessor === "tap" && !window.Tapjsli) {
22068
22204
  window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
22069
22205
  window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
@@ -22079,7 +22215,7 @@ const PaymentMethodContainerWithoutStripe = ({
22079
22215
  }, [selectedPaymentMethodId]);
22080
22216
 
22081
22217
  const initPaymentRequest = (state, dispatch) => {
22082
- if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) return;
22218
+ if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || props !== null && props !== void 0 && props.freeOrders)) return;
22083
22219
 
22084
22220
  try {
22085
22221
  const paymentRequest = stripe.paymentRequest({
@@ -22152,7 +22288,7 @@ const PaymentMethodContainerWithoutStripe = ({
22152
22288
  const updateTotalAmountWithTax = () => {
22153
22289
  var _window$Pelcro$site$r4;
22154
22290
 
22155
- if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) return;
22291
+ if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || props !== null && props !== void 0 && props.freeOrders)) return;
22156
22292
  const taxesEnabled = (_window$Pelcro$site$r4 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r4 === void 0 ? void 0 : _window$Pelcro$site$r4.taxes_enabled;
22157
22293
 
22158
22294
  if (taxesEnabled && type === "createPayment") {
@@ -22199,7 +22335,9 @@ const PaymentMethodContainerWithoutStripe = ({
22199
22335
  });
22200
22336
 
22201
22337
  if (err) {
22202
- onFailure(err);
22338
+ onFailure(err); //reset the coupon code in local state
22339
+
22340
+ setUpdatedCouponCode("");
22203
22341
  dispatch({
22204
22342
  type: SET_COUPON_ERROR,
22205
22343
  payload: getErrorMessages(err)
@@ -22259,7 +22397,9 @@ const PaymentMethodContainerWithoutStripe = ({
22259
22397
  dispatch({
22260
22398
  type: SET_COUPON,
22261
22399
  payload: res.data.coupon
22262
- });
22400
+ }); //set the coupon code in local state to be able to use with Vantiv
22401
+
22402
+ setUpdatedCouponCode(res.data.coupon.code);
22263
22403
  dispatch({
22264
22404
  type: SET_PERCENT_OFF,
22265
22405
  payload: `${(_res$data$coupon = res.data.coupon) === null || _res$data$coupon === void 0 ? void 0 : _res$data$coupon.percent_off}%`
@@ -22334,7 +22474,9 @@ const PaymentMethodContainerWithoutStripe = ({
22334
22474
  const debouncedApplyCouponCode = useRef(debounce$1(onApplyCouponCode, 1000)).current;
22335
22475
 
22336
22476
  const removeAppliedCoupon = state => {
22337
- state.couponCode = "";
22477
+ state.couponCode = ""; //reset the coupon code in local state
22478
+
22479
+ setUpdatedCouponCode("");
22338
22480
  dispatch({
22339
22481
  type: SET_COUPON_ERROR,
22340
22482
  payload: ""
@@ -22791,6 +22933,31 @@ const PaymentMethodContainerWithoutStripe = ({
22791
22933
  };
22792
22934
 
22793
22935
  const submitPayment = (state, dispatch) => {
22936
+ if (skipPayment && props !== null && props !== void 0 && props.freeOrders) {
22937
+ const isQuickPurchase = !Array.isArray(order);
22938
+ const mappedOrderItems = isQuickPurchase ? [{
22939
+ sku_id: order.id,
22940
+ quantity: order.quantity
22941
+ }] : order.map(item => ({
22942
+ sku_id: item.id,
22943
+ quantity: item.quantity
22944
+ }));
22945
+ window.Pelcro.ecommerce.order.create({
22946
+ items: mappedOrderItems,
22947
+ campaign_key: window.Pelcro.helpers.getURLParameter("campaign_key"),
22948
+ ...(selectedAddressId && {
22949
+ address_id: selectedAddressId
22950
+ })
22951
+ }, (err, res) => {
22952
+ if (err) {
22953
+ return handlePaymentError(err);
22954
+ }
22955
+
22956
+ return onSuccess(res);
22957
+ });
22958
+ return;
22959
+ }
22960
+
22794
22961
  stripe.createSource({
22795
22962
  type: "card"
22796
22963
  }).then(({
@@ -23055,12 +23222,16 @@ const PaymentMethodContainerWithoutStripe = ({
23055
23222
  disableSubmit: true,
23056
23223
  isLoading: true
23057
23224
  }, (state, dispatch) => {
23225
+ if (skipPayment && props !== null && props !== void 0 && props.freeOrders) {
23226
+ return submitPayment(state);
23227
+ }
23228
+
23058
23229
  if (getSiteCardProcessor() === "vantiv") {
23059
23230
  return submitUsingVantiv();
23060
23231
  }
23061
23232
 
23062
23233
  if (getSiteCardProcessor() === "tap") {
23063
- return submitUsingTap();
23234
+ return submitUsingTap(state);
23064
23235
  }
23065
23236
 
23066
23237
  if (selectedPaymentMethodId) {
@@ -23189,10 +23360,14 @@ const PaymentMethodContainerWithoutStripe = ({
23189
23360
  state,
23190
23361
  dispatch
23191
23362
  }
23192
- }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
23193
- store: store$l,
23194
- key: i
23195
- })) : /*#__PURE__*/React__default.cloneElement(children, {
23363
+ }, children.length ? children.map((child, i) => {
23364
+ if (child) {
23365
+ return /*#__PURE__*/React__default.cloneElement(child, {
23366
+ store: store$l,
23367
+ key: i
23368
+ });
23369
+ }
23370
+ }) : /*#__PURE__*/React__default.cloneElement(children, {
23196
23371
  store: store$l
23197
23372
  })));
23198
23373
  };
@@ -23223,11 +23398,13 @@ const PaymentMethodContainer = props => {
23223
23398
  }, /*#__PURE__*/React__default.createElement(es_11, null, /*#__PURE__*/React__default.createElement(UnwrappedForm, Object.assign({
23224
23399
  store: store$l
23225
23400
  }, props))));
23226
- } else {
23401
+ } else if (cardProcessor !== "stripe") {
23227
23402
  return /*#__PURE__*/React__default.createElement(PaymentMethodContainerWithoutStripe, Object.assign({
23228
23403
  store: store$l
23229
23404
  }, props));
23230
23405
  }
23406
+
23407
+ return null;
23231
23408
  };
23232
23409
 
23233
23410
  const StripeInputStyle = {
@@ -23798,7 +23975,7 @@ const PaypalSubscribeButton = props => {
23798
23975
  var _ref, _ref2, _state$updatedPrice, _props$plan, _props$selectedAddres;
23799
23976
 
23800
23977
  // sometimes, price is updated. eg. Coupon codes.
23801
- const updatedPrice = (_ref = (_ref2 = (_state$updatedPrice = state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : (_props$plan = props.plan) === null || _props$plan === void 0 ? void 0 : _props$plan.amount) !== null && _ref2 !== void 0 ? _ref2 : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref !== void 0 ? _ref : invoice.amount_remaining;
23978
+ const updatedPrice = (_ref = (_ref2 = (_state$updatedPrice = state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : (_props$plan = props.plan) === null || _props$plan === void 0 ? void 0 : _props$plan.amount) !== null && _ref2 !== void 0 ? _ref2 : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref !== void 0 ? _ref : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining;
23802
23979
  const selectedAddress = getAddressById((_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : selectedAddressId); // initialize paypal client, then render paypal button.
23803
23980
 
23804
23981
  const initializePaypal = async () => {
@@ -24063,6 +24240,41 @@ const BankAuthenticationSuccess = () => {
24063
24240
  }));
24064
24241
  };
24065
24242
 
24243
+ const OrderCreateFreeButton = ({
24244
+ name,
24245
+ onClick,
24246
+ ...otherProps
24247
+ }) => {
24248
+ const {
24249
+ state: {
24250
+ disableSubmit
24251
+ },
24252
+ dispatch
24253
+ } = useContext(store$l);
24254
+ const {
24255
+ t
24256
+ } = useTranslation("checkoutForm");
24257
+ const [isDisabled, setDisabled] = useState(true);
24258
+ useEffect(() => {
24259
+ setDisabled(disableSubmit);
24260
+ }, [disableSubmit]);
24261
+ return /*#__PURE__*/React__default.createElement(Button, Object.assign({
24262
+ className: "plc-w-full",
24263
+ onClick: () => {
24264
+ dispatch({
24265
+ type: DISABLE_SUBMIT,
24266
+ payload: true
24267
+ });
24268
+ dispatch({
24269
+ type: SUBMIT_PAYMENT
24270
+ });
24271
+ onClick === null || onClick === void 0 ? void 0 : onClick();
24272
+ },
24273
+ disabled: isDisabled,
24274
+ isLoading: disableSubmit
24275
+ }, otherProps), t("labels.submit"));
24276
+ };
24277
+
24066
24278
  /**
24067
24279
  *
24068
24280
  */
@@ -24074,9 +24286,11 @@ function PaymentMethodView({
24074
24286
  type,
24075
24287
  showCoupon,
24076
24288
  showExternalPaymentMethods,
24077
- showSubscriptionButton
24289
+ showSubscriptionButton,
24290
+ showOrderButton,
24291
+ order
24078
24292
  }) {
24079
- var _window$Pelcro$site$r, _window$Pelcro$site$r2;
24293
+ var _window$Pelcro$site$r, _window$Pelcro$site$r2, _calcAndFormatItemsTo, _order$;
24080
24294
 
24081
24295
  const {
24082
24296
  t
@@ -24089,7 +24303,17 @@ function PaymentMethodView({
24089
24303
  const isUserPhone = Boolean(window.Pelcro.user.read().phone);
24090
24304
  return /*#__PURE__*/React__default.createElement("div", {
24091
24305
  className: "plc-flex plc-flex-col plc-items-center plc-mt-4 sm:plc-px-8 pelcro-payment-block"
24092
- }, cardProcessor === "stripe" && !showSubscriptionButton && /*#__PURE__*/React__default.createElement("div", {
24306
+ }, order && /*#__PURE__*/React__default.createElement("div", {
24307
+ className: "plc-w-full plc-p-2 plc-mb-4 plc-font-semibold plc-text-center plc-text-gray-900 plc-bg-gray-100 plc-border plc-border-gray-200"
24308
+ }, /*#__PURE__*/React__default.createElement("p", {
24309
+ className: "plc-text-gray-600"
24310
+ }, !Array.isArray(order) ? /*#__PURE__*/React__default.createElement("span", {
24311
+ className: "plc-tracking-wider plc-uppercase"
24312
+ }, order === null || order === void 0 ? void 0 : order.name) : /*#__PURE__*/React__default.createElement("span", {
24313
+ className: "plc-tracking-wider plc-uppercase"
24314
+ }, t("labels.freeItems")), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
24315
+ className: "plc-text-xl plc-font-semibold plc-text-primary-600"
24316
+ }, (_calcAndFormatItemsTo = calcAndFormatItemsTotal(order, (_order$ = order[0]) === null || _order$ === void 0 ? void 0 : _order$.currency)) !== null && _calcAndFormatItemsTo !== void 0 ? _calcAndFormatItemsTo : getFormattedPriceByLocal(order === null || order === void 0 ? void 0 : order.price, order === null || order === void 0 ? void 0 : order.currency, getPageOrDefaultLanguage())))), cardProcessor === "stripe" && !showSubscriptionButton && !showOrderButton && /*#__PURE__*/React__default.createElement("div", {
24093
24317
  className: "plc-flex plc-items-center plc-w-full plc-px-4 plc-py-2 plc-text-center plc-text-green-600 plc-border plc-border-green-400 plc-rounded plc-bg-green-50"
24094
24318
  }, /*#__PURE__*/React__default.createElement(SvgLock, {
24095
24319
  className: "plc-w-5 plc-h-5 plc-mr-1"
@@ -24105,10 +24329,11 @@ function PaymentMethodView({
24105
24329
  type: type,
24106
24330
  onSuccess: onSuccess,
24107
24331
  onGiftRenewalSuccess: onGiftRenewalSuccess,
24108
- onFailure: onFailure
24332
+ onFailure: onFailure,
24333
+ freeOrders: showOrderButton
24109
24334
  }, /*#__PURE__*/React__default.createElement(AlertWithContext, {
24110
24335
  className: "plc-mb-2"
24111
- }), showSubscriptionButton ? /*#__PURE__*/React__default.createElement(SubscriptionCreateFreePlanButton, null) : /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(BankRedirection, null), /*#__PURE__*/React__default.createElement(BankAuthenticationSuccess, null), /*#__PURE__*/React__default.createElement(SelectedPaymentMethod, null), supportsTap && (!isUserFirstName || !isUserLastName || !isUserPhone) && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
24336
+ }), showSubscriptionButton && /*#__PURE__*/React__default.createElement(SubscriptionCreateFreePlanButton, null), showOrderButton && /*#__PURE__*/React__default.createElement(OrderCreateFreeButton, null), !showSubscriptionButton && !showOrderButton && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(BankRedirection, null), /*#__PURE__*/React__default.createElement(BankAuthenticationSuccess, null), /*#__PURE__*/React__default.createElement(SelectedPaymentMethod, null), supportsTap && (!isUserFirstName || !isUserLastName || !isUserPhone) && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
24112
24337
  className: "plc-flex plc-items-start"
24113
24338
  }, /*#__PURE__*/React__default.createElement(IncludeFirstName, {
24114
24339
  id: "pelcro-input-first-name",
@@ -25984,6 +26209,19 @@ function SubscriptionManageMembersList(props) {
25984
26209
  icon: /*#__PURE__*/React__default.createElement(SvgCheckMark, null)
25985
26210
  };
25986
26211
  }, []);
26212
+ const showMemberData = useCallback(member => {
26213
+ var _member$customer, _member$customer2, _member$customer3, _member$customer4;
26214
+
26215
+ let data;
26216
+
26217
+ if ((member === null || member === void 0 ? void 0 : member.status) !== "active") {
26218
+ data = member === null || member === void 0 ? void 0 : member.invitation_email;
26219
+ return data;
26220
+ }
26221
+
26222
+ data = (member === null || member === void 0 ? void 0 : (_member$customer = member.customer) === null || _member$customer === void 0 ? void 0 : _member$customer.email) || (member === null || member === void 0 ? void 0 : (_member$customer2 = member.customer) === null || _member$customer2 === void 0 ? void 0 : _member$customer2.first_name) + " " + (member === null || member === void 0 ? void 0 : (_member$customer3 = member.customer) === null || _member$customer3 === void 0 ? void 0 : _member$customer3.last_name) || (member === null || member === void 0 ? void 0 : (_member$customer4 = member.customer) === null || _member$customer4 === void 0 ? void 0 : _member$customer4.username) || "-----";
26223
+ return data;
26224
+ }, []);
25987
26225
 
25988
26226
  if (loading) {
25989
26227
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement("div", {
@@ -26028,10 +26266,10 @@ function SubscriptionManageMembersList(props) {
26028
26266
  className: `plc-w-full plc-align-middle plc-cursor-pointer accordion-header hover:plc-bg-gray-50 plc-text-center`
26029
26267
  }, /*#__PURE__*/React__default.createElement("td", {
26030
26268
  className: "plc-truncate plc-text-left",
26031
- title: member === null || member === void 0 ? void 0 : member.invitation_email
26269
+ title: showMemberData(member)
26032
26270
  }, /*#__PURE__*/React__default.createElement("span", {
26033
26271
  className: "plc-font-semibold plc-text-gray-500"
26034
- }, member === null || member === void 0 ? void 0 : member.invitation_email)), /*#__PURE__*/React__default.createElement("td", {
26272
+ }, showMemberData(member))), /*#__PURE__*/React__default.createElement("td", {
26035
26273
  className: "plc-py-2"
26036
26274
  }, /*#__PURE__*/React__default.createElement("span", {
26037
26275
  className: `plc-inline-flex plc-p-1 plc-text-xs plc-font-semibold ${getMemberStatus(member).bgColor} plc-uppercase ${getMemberStatus(member).textColor} plc-rounded-lg`
@@ -29708,6 +29946,14 @@ const OrderCreateContainer = props => /*#__PURE__*/React__default.createElement(
29708
29946
  }, props));
29709
29947
 
29710
29948
  const OrderCreateView = props => {
29949
+ var _window$Pelcro, _window$Pelcro$uiSett;
29950
+
29951
+ useTranslation("payment");
29952
+ const {
29953
+ order
29954
+ } = usePelcro();
29955
+ const skipPayment = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.skipPaymentForFreePlans;
29956
+ const showOrderButton = skipPayment && ((order === null || order === void 0 ? void 0 : order.price) === 0 || (order === null || order === void 0 ? void 0 : order.length) > 0 && order.every(item => (item === null || item === void 0 ? void 0 : item.price) === 0));
29711
29957
  return /*#__PURE__*/React__default.createElement("div", {
29712
29958
  id: "pelcro-order-create-view"
29713
29959
  }, /*#__PURE__*/React__default.createElement("form", {
@@ -29716,7 +29962,9 @@ const OrderCreateView = props => {
29716
29962
  }, /*#__PURE__*/React__default.createElement(PaymentMethodView, Object.assign({
29717
29963
  type: "orderCreate",
29718
29964
  showCoupon: true,
29719
- showExternalPaymentMethods: false
29965
+ showExternalPaymentMethods: false,
29966
+ showOrderButton: showOrderButton,
29967
+ order: order
29720
29968
  }, props))));
29721
29969
  };
29722
29970
 
@@ -30999,17 +31247,18 @@ const PaymentMethodSelectModal = ({
30999
31247
  }) => {
31000
31248
  var _window$Pelcro, _window$Pelcro$uiSett;
31001
31249
 
31250
+ const {
31251
+ t
31252
+ } = useTranslation("paymentMethod");
31002
31253
  const {
31003
31254
  switchToCheckoutForm,
31004
31255
  set,
31005
- plan
31256
+ plan,
31257
+ order
31006
31258
  } = usePelcro();
31007
- const {
31008
- t
31009
- } = useTranslation("paymentMethod");
31010
31259
  const skipPayment = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.skipPaymentForFreePlans;
31011
31260
  useEffect(() => {
31012
- if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) {
31261
+ if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || (order === null || order === void 0 ? void 0 : order.price) === 0)) {
31013
31262
  switchToCheckoutForm();
31014
31263
  }
31015
31264
  }, []);
@@ -38805,4 +39054,4 @@ const QrCodeModal = ({
38805
39054
  };
38806
39055
  QrCodeModal.viewId = "qrcode";
38807
39056
 
38808
- export { AddNew, AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, Button, Card, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, Dashboard, DashboardAddresses, DashboardContainer, DashboardContent, DashboardDonations, DashboardGifts, DashboardHeading, DashboardInvoices, DashboardLink, DashboardMemberships, DashboardNewsletters, DashboardOpenButton, DashboardOrders, DashboardPasswordChange, DashboardPaymentCards, DashboardProfile, DashboardQRCode, DashboardSavedItems, DashboardSubscriptions, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, ModalHeader, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateFreePlanButton, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionManageMembersButton, SubscriptionManageMembersContainer, SubscriptionManageMembersEmails, SubscriptionManageMembersList, SubscriptionManageMembersModal, SubscriptionManageMembersView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, SubscriptionSuspendContainer, SubscriptionSuspendModal, SubscriptionSuspendView, TaxAmount, TextArea, Tooltip, UserNameInput, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateTin, UserUpdateUsername, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };
39057
+ export { AddNew, AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, Button, Card, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, Dashboard, DashboardAddresses, DashboardContainer, DashboardContent, DashboardDonations, DashboardGifts, DashboardHeading, DashboardInvoices, DashboardLink, DashboardMemberships, DashboardNewsletters, DashboardOpenButton, DashboardOrders, DashboardPasswordChange, DashboardPaymentCards, DashboardProfile, DashboardQRCode, DashboardSavedItems, DashboardSubscriptions, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, ModalHeader, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateFreeButton, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateFreePlanButton, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionManageMembersButton, SubscriptionManageMembersContainer, SubscriptionManageMembersEmails, SubscriptionManageMembersList, SubscriptionManageMembersModal, SubscriptionManageMembersView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, SubscriptionSuspendContainer, SubscriptionSuspendModal, SubscriptionSuspendView, TaxAmount, TextArea, Tooltip, UserNameInput, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateTin, UserUpdateUsername, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };