@pelcro/react-pelcro-js 3.13.0 → 3.15.0

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
@@ -3604,6 +3604,8 @@ var labels$Y = {
3604
3604
  email: "Email",
3605
3605
  firstName: "First name",
3606
3606
  lastName: "Last name",
3607
+ username: "Username",
3608
+ displayname: "Display name",
3607
3609
  phone: "Phone",
3608
3610
  submit: "Submit",
3609
3611
  required: "Required",
@@ -4537,6 +4539,8 @@ var labels$D = {
4537
4539
  email: "Address courriel",
4538
4540
  firstName: "Prénom",
4539
4541
  lastName: "Nom de famille",
4542
+ username: "Nom d'utilisateur",
4543
+ displayname: "Afficher un nom",
4540
4544
  phone: "Numéro de téléphone",
4541
4545
  submit: "Soumettre",
4542
4546
  required: "Champs obligatoires",
@@ -5354,6 +5358,8 @@ var labels$o = {
5354
5358
  email: "이메일",
5355
5359
  firstName: "이름",
5356
5360
  lastName: "성",
5361
+ username: "사용자 이름",
5362
+ displayname: "이름 표시하기",
5357
5363
  phone: "전화번호",
5358
5364
  submit: "제출",
5359
5365
  required: "필수 항목",
@@ -6273,6 +6279,8 @@ var labels$9 = {
6273
6279
  email: "Correo",
6274
6280
  firstName: "Nombre",
6275
6281
  lastName: "Apellido",
6282
+ username: "Nombre de usuario",
6283
+ displayname: "Nombre para mostrar",
6276
6284
  phone: "Teléfono",
6277
6285
  submit: "Enviar",
6278
6286
  required: "Obligatorio",
@@ -8279,7 +8287,7 @@ class PelcroActions {
8279
8287
  return console.error("invalid subscription id");
8280
8288
  }
8281
8289
 
8282
- if ((subscriptionToManageMembers === null || subscriptionToManageMembers === void 0 ? void 0 : (_subscriptionToManage = subscriptionToManageMembers.plan) === null || _subscriptionToManage === void 0 ? void 0 : _subscriptionToManage.type) !== 'membership') {
8290
+ if ((subscriptionToManageMembers === null || subscriptionToManageMembers === void 0 ? void 0 : (_subscriptionToManage = subscriptionToManageMembers.plan) === null || _subscriptionToManage === void 0 ? void 0 : _subscriptionToManage.type) !== "membership") {
8283
8291
  return console.error("subscription is not from type membership");
8284
8292
  }
8285
8293
 
@@ -8579,7 +8587,7 @@ const createPelcroHook = store => {
8579
8587
 
8580
8588
  pelcroHook.override = fn => {
8581
8589
  const partialState = fn(store.setState, store.getState);
8582
- usePelcro.setState(partialState);
8590
+ usePelcro$1.setState(partialState);
8583
8591
  };
8584
8592
 
8585
8593
  pelcroHook.getStore = pelcroHook.getState;
@@ -8587,11 +8595,11 @@ const createPelcroHook = store => {
8587
8595
  };
8588
8596
 
8589
8597
  const pelcroStore = createPelcroStore();
8590
- const usePelcro = createPelcroHook(pelcroStore);
8598
+ const usePelcro$1 = createPelcroHook(pelcroStore);
8591
8599
  /* istanbul ignore next */
8592
8600
 
8593
8601
  if (process.env.NODE_ENV === "development") {
8594
- c$1("Pelcro Store", usePelcro);
8602
+ c$1("Pelcro Store", usePelcro$1);
8595
8603
  }
8596
8604
 
8597
8605
  /**
@@ -8796,7 +8804,7 @@ const trackSubscriptionOnGA = () => {
8796
8804
  product,
8797
8805
  plan,
8798
8806
  couponCode
8799
- } = usePelcro.getStore();
8807
+ } = usePelcro$1.getStore();
8800
8808
  /*
8801
8809
  getting the latest subscription id from invoices instead of subscriptions
8802
8810
  to handle gifted subs which are not added to subs list
@@ -9116,7 +9124,7 @@ class SaveToMetadataButtonClass {
9116
9124
  _defineProperty$3(this, "unauthenticated", () => {
9117
9125
  const {
9118
9126
  switchView
9119
- } = usePelcro.getStore();
9127
+ } = usePelcro$1.getStore();
9120
9128
 
9121
9129
  _classPrivateFieldGet(this, _onClick).call(this, () => switchView("login"));
9122
9130
 
@@ -9199,7 +9207,7 @@ class SaveToMetadataButtonClass {
9199
9207
  const user = window.Pelcro.user.read();
9200
9208
  const {
9201
9209
  switchView
9202
- } = usePelcro.getStore();
9210
+ } = usePelcro$1.getStore();
9203
9211
  const {
9204
9212
  key,
9205
9213
  ...buttonMetadata
@@ -10303,7 +10311,7 @@ toast.confirm = (onConfirm, {
10303
10311
  ...options
10304
10312
  });
10305
10313
  setTimeout(() => {
10306
- notify.dismiss(id);
10314
+ notify$1.dismiss(id);
10307
10315
  }, 3000);
10308
10316
  };
10309
10317
 
@@ -10313,12 +10321,12 @@ toast.confirm = (onConfirm, {
10313
10321
  ...options
10314
10322
  });
10315
10323
  setTimeout(() => {
10316
- notify.dismiss(id);
10324
+ notify$1.dismiss(id);
10317
10325
  }, 3000);
10318
10326
  };
10319
10327
  };
10320
10328
 
10321
- const notify = toast;
10329
+ const notify$1 = toast;
10322
10330
 
10323
10331
  const translations = i18next.t("common:buttons", {
10324
10332
  returnObjects: true
@@ -10335,7 +10343,19 @@ const init$1 = () => {
10335
10343
  addToCart,
10336
10344
  purchaseItem,
10337
10345
  setSubscriptionToManageMembers
10338
- } = usePelcro.getStore();
10346
+ } = usePelcro$1.getStore();
10347
+ const pelcroDashboardButtonsByClass = document.getElementsByClassName("pelcro-dashboard-button");
10348
+
10349
+ if (pelcroDashboardButtonsByClass.length !== 0) {
10350
+ for (let i = 0; i < pelcroDashboardButtonsByClass.length; i++) {
10351
+ pelcroDashboardButtonsByClass[i].addEventListener("click", () => {
10352
+ if (isAuthenticated()) {
10353
+ switchView("dashboard");
10354
+ }
10355
+ });
10356
+ }
10357
+ }
10358
+
10339
10359
  const pelcroLoginButtonsByClass = document.getElementsByClassName("pelcro-login-button");
10340
10360
 
10341
10361
  if (pelcroLoginButtonsByClass.length !== 0) {
@@ -10377,7 +10397,7 @@ const init$1 = () => {
10377
10397
  const errorMessage = i18next.t("messages:invalidSubscription", {
10378
10398
  returnObjects: true
10379
10399
  });
10380
- return notify.error(errorMessage);
10400
+ return notify$1.error(errorMessage);
10381
10401
  }
10382
10402
 
10383
10403
  switchView("manage-members");
@@ -10386,7 +10406,7 @@ const init$1 = () => {
10386
10406
  const errorMessage = i18next.t("messages:invalidSubscription", {
10387
10407
  returnObjects: true
10388
10408
  });
10389
- return notify.error(errorMessage);
10409
+ return notify$1.error(errorMessage);
10390
10410
  }
10391
10411
  }
10392
10412
  }
@@ -10556,7 +10576,7 @@ const init$1 = () => {
10556
10576
  const errorMsg = i18next.t("shop:messages.currencyMismatch", {
10557
10577
  currency: userCurrency
10558
10578
  });
10559
- notify.error(errorMsg);
10579
+ notify$1.error(errorMsg);
10560
10580
  }
10561
10581
  });
10562
10582
  }
@@ -10626,7 +10646,7 @@ const init = () => {
10626
10646
  const {
10627
10647
  switchView,
10628
10648
  set
10629
- } = usePelcro.getStore();
10649
+ } = usePelcro$1.getStore();
10630
10650
  const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
10631
10651
 
10632
10652
  if (entitlementsProtectedElements.length === 0) {
@@ -10658,7 +10678,7 @@ const init = () => {
10658
10678
  elemDeepClone.setAttribute("style", "filter:blur(3px) !important; pointer-events:none !important; user-select:none !important");
10659
10679
  unblurElemWhenUserSubscribes(elemDeepClone, entitlements);
10660
10680
  const NOTIFICATION_ID = "entitlement";
10661
- notify( /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement(Trans, {
10681
+ notify$1( /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement(Trans, {
10662
10682
  i18nKey: "messages:entitlement"
10663
10683
  }, "Some of the content on this page is available with one or more of our plans.", /*#__PURE__*/React__default.createElement(Link, {
10664
10684
  onClick: () => {
@@ -10675,7 +10695,7 @@ const init = () => {
10675
10695
  });
10676
10696
  }
10677
10697
 
10678
- notify.dismiss(NOTIFICATION_ID);
10698
+ notify$1.dismiss(NOTIFICATION_ID);
10679
10699
  switchView("_plan-select-entitlements");
10680
10700
  }
10681
10701
  }, "Subscribe"), "now to get full page access.")), {
@@ -10715,7 +10735,7 @@ function unblurElemWhenUserSubscribes(elem, entitlements) {
10715
10735
  document.addEventListener("PelcroSubscriptionCreate", event => {
10716
10736
  const {
10717
10737
  isGift
10718
- } = usePelcro.getStore();
10738
+ } = usePelcro$1.getStore();
10719
10739
  if (isGift) return;
10720
10740
  const latestSub = event.detail.data.subscriptions[event.detail.data.subscriptions.length - 1];
10721
10741
  const shouldUnblurContent = entitlements.some(ent => {
@@ -11037,7 +11057,7 @@ const initPaywalls = () => {
11037
11057
 
11038
11058
  const {
11039
11059
  switchView
11040
- } = usePelcro.getStore();
11060
+ } = usePelcro$1.getStore();
11041
11061
 
11042
11062
  if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayMeterPaywall()) {
11043
11063
  /*
@@ -11059,7 +11079,7 @@ const loadPaymentSDKs = () => {
11059
11079
  // Lazy load stripe's SDK
11060
11080
  const {
11061
11081
  whenUserReady
11062
- } = usePelcro.getStore();
11082
+ } = usePelcro$1.getStore();
11063
11083
  whenUserReady(() => {
11064
11084
  if (!window.Stripe) {
11065
11085
  pure_1(window.Pelcro.environment.stripe);
@@ -11107,7 +11127,7 @@ const loadAuth0SDK = () => {
11107
11127
  const initSecuritySdk = () => {
11108
11128
  const {
11109
11129
  whenSiteReady
11110
- } = usePelcro.getStore();
11130
+ } = usePelcro$1.getStore();
11111
11131
  whenSiteReady(() => {
11112
11132
  var _window$Pelcro$site$r2;
11113
11133
 
@@ -11143,7 +11163,7 @@ const dispatchModalDisplayEvents = modalName => {
11143
11163
  const {
11144
11164
  whenSiteReady,
11145
11165
  whenEcommerceLoaded
11146
- } = usePelcro.getStore();
11166
+ } = usePelcro$1.getStore();
11147
11167
  const renderShopView = shopComponent => {
11148
11168
  whenEcommerceLoaded(() => {
11149
11169
  const shopElement = document.getElementById("pelcro-shop");
@@ -11225,7 +11245,7 @@ const initViewFromURL = () => {
11225
11245
  const {
11226
11246
  switchView,
11227
11247
  whenSiteReady
11228
- } = usePelcro.getStore();
11248
+ } = usePelcro$1.getStore();
11229
11249
 
11230
11250
  if (isValidViewFromURL(view)) {
11231
11251
  whenSiteReady(() => {
@@ -11283,7 +11303,7 @@ const initSubscriptionFromURL = () => {
11283
11303
  switchView,
11284
11304
  whenSiteReady,
11285
11305
  set
11286
- } = usePelcro.getStore();
11306
+ } = usePelcro$1.getStore();
11287
11307
  whenSiteReady(() => {
11288
11308
  var _selectedProduct$plan;
11289
11309
 
@@ -11307,7 +11327,7 @@ const initSubscriptionFromURL = () => {
11307
11327
  isAuthenticated,
11308
11328
  switchToAddressView,
11309
11329
  switchToPaymentView
11310
- } = usePelcro.getStore();
11330
+ } = usePelcro$1.getStore();
11311
11331
 
11312
11332
  if (!isAuthenticated()) {
11313
11333
  return switchView("register");
@@ -11339,7 +11359,7 @@ const initOfflineSubscriptionFromURL = offlinePlanId => {
11339
11359
  switchToPaymentView,
11340
11360
  switchToAddressView,
11341
11361
  set
11342
- } = usePelcro.getStore();
11362
+ } = usePelcro$1.getStore();
11343
11363
  whenSiteReady(() => {
11344
11364
  window.Pelcro.plan.getPlan({
11345
11365
  plan_id: offlinePlanId
@@ -11386,7 +11406,7 @@ const initPurchaseFromUrl = () => {
11386
11406
  const {
11387
11407
  whenEcommerceLoaded,
11388
11408
  purchaseItem
11389
- } = usePelcro.getStore();
11409
+ } = usePelcro$1.getStore();
11390
11410
  whenEcommerceLoaded(() => {
11391
11411
  const skuId = window.Pelcro.helpers.getURLParameter("sku_id");
11392
11412
  purchaseItem(skuId);
@@ -11402,7 +11422,7 @@ const initCartFromUrl = () => {
11402
11422
  whenEcommerceLoaded,
11403
11423
  addToCart,
11404
11424
  switchView
11405
- } = usePelcro.getStore();
11425
+ } = usePelcro$1.getStore();
11406
11426
  whenEcommerceLoaded(() => {
11407
11427
  const skusIdsParam = window.Pelcro.helpers.getURLParameter("sku_id");
11408
11428
  const skusIds = skusIdsParam === null || skusIdsParam === void 0 ? void 0 : skusIdsParam.split(",");
@@ -11423,7 +11443,7 @@ const verifyEmailTokenFromUrl = () => {
11423
11443
 
11424
11444
  const {
11425
11445
  whenSiteReady
11426
- } = usePelcro.getStore();
11446
+ } = usePelcro$1.getStore();
11427
11447
  const translations = i18next.t("verifyEmail:messages", {
11428
11448
  returnObjects: true
11429
11449
  });
@@ -11435,10 +11455,10 @@ const verifyEmailTokenFromUrl = () => {
11435
11455
  token: emailToken
11436
11456
  }, (err, res) => {
11437
11457
  if (err) {
11438
- return notify.error(getErrorMessages(err));
11458
+ return notify$1.error(getErrorMessages(err));
11439
11459
  }
11440
11460
 
11441
- return notify.success(translations.success);
11461
+ return notify$1.success(translations.success);
11442
11462
  });
11443
11463
  }, {
11444
11464
  once: true
@@ -11452,7 +11472,7 @@ const verifyLinkTokenFromUrl = () => {
11452
11472
  whenSiteReady,
11453
11473
  resetView,
11454
11474
  isAuthenticated
11455
- } = usePelcro.getStore();
11475
+ } = usePelcro$1.getStore();
11456
11476
  const translations = i18next.t("verifyLinkToken:messages", {
11457
11477
  returnObjects: true
11458
11478
  });
@@ -11464,7 +11484,7 @@ const verifyLinkTokenFromUrl = () => {
11464
11484
  token: loginToken
11465
11485
  }, (err, res) => {
11466
11486
  if (err) {
11467
- return notify.error(getErrorMessages(err));
11487
+ return notify$1.error(getErrorMessages(err));
11468
11488
  }
11469
11489
 
11470
11490
  const {
@@ -11474,11 +11494,11 @@ const verifyLinkTokenFromUrl = () => {
11474
11494
  auth_token
11475
11495
  }, (err, res) => {
11476
11496
  if (err) {
11477
- return notify.error(getErrorMessages(err));
11497
+ return notify$1.error(getErrorMessages(err));
11478
11498
  }
11479
11499
 
11480
11500
  resetView();
11481
- return notify.success(translations.success);
11501
+ return notify$1.success(translations.success);
11482
11502
  });
11483
11503
  });
11484
11504
  }, {
@@ -11491,12 +11511,12 @@ const showPasswordlessRequestFromUrl = () => {
11491
11511
 
11492
11512
  const {
11493
11513
  isAuthenticated
11494
- } = usePelcro.getStore();
11514
+ } = usePelcro$1.getStore();
11495
11515
  const passwordlessEnabled = (_window$Pelcro$site$r8 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r8 === void 0 ? void 0 : _window$Pelcro$site$r8.passwordless_enabled;
11496
11516
  if (!passwordlessEnabled || isAuthenticated()) return;
11497
11517
  const {
11498
11518
  switchView
11499
- } = usePelcro.getStore();
11519
+ } = usePelcro$1.getStore();
11500
11520
  return switchView("passwordless-request");
11501
11521
  };
11502
11522
 
@@ -11507,7 +11527,7 @@ const showInvoiceDetailsFromUrl = () => {
11507
11527
  whenUserReady,
11508
11528
  whenSiteReady,
11509
11529
  switchView
11510
- } = usePelcro.getStore();
11530
+ } = usePelcro$1.getStore();
11511
11531
  whenSiteReady(() => {
11512
11532
  if (!isAuthenticated()) {
11513
11533
  return switchView("login");
@@ -11521,18 +11541,18 @@ const showInvoiceDetailsFromUrl = () => {
11521
11541
  const errorMessage = i18next.t("messages:invalidInvoice", {
11522
11542
  returnObjects: true
11523
11543
  });
11524
- return notify.error(errorMessage);
11544
+ return notify$1.error(errorMessage);
11525
11545
  }
11526
11546
 
11527
11547
  const {
11528
11548
  invoice
11529
- } = usePelcro.getStore();
11549
+ } = usePelcro$1.getStore();
11530
11550
 
11531
11551
  if (invoice.total === 0) {
11532
11552
  const errorMessage = i18next.t("messages:zeroTotalInvoice", {
11533
11553
  returnObjects: true
11534
11554
  });
11535
- return notify.error(errorMessage);
11555
+ return notify$1.error(errorMessage);
11536
11556
  }
11537
11557
 
11538
11558
  return switchView("invoice-details");
@@ -11547,7 +11567,7 @@ const showSubscriptionManageMembersFromUrl = () => {
11547
11567
  whenUserReady,
11548
11568
  whenSiteReady,
11549
11569
  switchView
11550
- } = usePelcro.getStore();
11570
+ } = usePelcro$1.getStore();
11551
11571
  whenSiteReady(() => {
11552
11572
  if (!isAuthenticated()) {
11553
11573
  return switchView("login");
@@ -11561,7 +11581,7 @@ const showSubscriptionManageMembersFromUrl = () => {
11561
11581
  const errorMessage = i18next.t("messages:invalidSubscription", {
11562
11582
  returnObjects: true
11563
11583
  });
11564
- return notify.error(errorMessage);
11584
+ return notify$1.error(errorMessage);
11565
11585
  }
11566
11586
 
11567
11587
  return switchView("manage-members");
@@ -11587,7 +11607,7 @@ const PelcroModalController = ({
11587
11607
  view,
11588
11608
  isAuthenticated,
11589
11609
  whenSiteReady
11590
- } = usePelcro();
11610
+ } = usePelcro$1();
11591
11611
  React__default.useEffect(() => {
11592
11612
  init$1();
11593
11613
  renderShopView(React__default.Children.map(children, child => child).find(({
@@ -13348,7 +13368,7 @@ function Modal({
13348
13368
  }) {
13349
13369
  var _window$Pelcro, _window$Pelcro$site$r;
13350
13370
 
13351
- const resetView = usePelcro(state => state.resetView);
13371
+ const resetView = usePelcro$1(state => state.resetView);
13352
13372
  useEffect(() => {
13353
13373
  onDisplay === null || onDisplay === void 0 ? void 0 : onDisplay();
13354
13374
  dispatchModalDisplayEvents(id);
@@ -13421,8 +13441,11 @@ function LoginModal({
13421
13441
  const {
13422
13442
  switchView,
13423
13443
  resetView,
13424
- invoice
13425
- } = usePelcro();
13444
+ product,
13445
+ order,
13446
+ switchToAddressView,
13447
+ switchToPaymentView
13448
+ } = usePelcro$1();
13426
13449
 
13427
13450
  const onSuccess = res => {
13428
13451
  var _props$onSuccess;
@@ -13433,10 +13456,23 @@ function LoginModal({
13433
13456
  initPaywalls();
13434
13457
  }
13435
13458
 
13459
+ if (product) {
13460
+ if (product.address_required) {
13461
+ return switchToAddressView();
13462
+ } else {
13463
+ return switchToPaymentView();
13464
+ }
13465
+ }
13466
+
13467
+ if (order) {
13468
+ return switchToAddressView();
13469
+ }
13470
+
13436
13471
  resetView();
13437
13472
  const viewFromURL = getStableViewID(window.Pelcro.helpers.getURLParameter("view"));
13473
+ const viewsURLs = ["invoice-details", "gift-redeem", "plan-select"];
13438
13474
 
13439
- if (viewFromURL === "invoice-details") {
13475
+ if (viewsURLs.includes(viewFromURL)) {
13440
13476
  initViewFromURL();
13441
13477
  }
13442
13478
  };
@@ -13759,7 +13795,7 @@ function RegisterView(props) {
13759
13795
  } = useTranslation("register");
13760
13796
  const {
13761
13797
  product
13762
- } = usePelcro();
13798
+ } = usePelcro$1();
13763
13799
  const title = (_product$paywall$regi = product === null || product === void 0 ? void 0 : (_product$paywall = product.paywall) === null || _product$paywall === void 0 ? void 0 : _product$paywall.register_title) !== null && _product$paywall$regi !== void 0 ? _product$paywall$regi : t("title");
13764
13800
  const subtitle = (_product$paywall$regi2 = product === null || product === void 0 ? void 0 : (_product$paywall2 = product.paywall) === null || _product$paywall2 === void 0 ? void 0 : _product$paywall2.register_subtitle) !== null && _product$paywall$regi2 !== void 0 ? _product$paywall$regi2 : t("subtitle");
13765
13801
  const socialLoginEnabled = ((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id) || ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.google_app_id) || ((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.auth0_client_id);
@@ -13990,7 +14026,7 @@ function RegisterModal(props) {
13990
14026
  order,
13991
14027
  giftCode,
13992
14028
  isGift
13993
- } = usePelcro();
14029
+ } = usePelcro$1();
13994
14030
 
13995
14031
  const onSuccess = res => {
13996
14032
  var _props$onSuccess;
@@ -14020,7 +14056,7 @@ function RegisterModal(props) {
14020
14056
 
14021
14057
 
14022
14058
  if (giftCode) {
14023
- return switchToAddressView();
14059
+ return switchView("gift-redeem"); // return switchToAddressView();
14024
14060
  } // Check if the subscription is meant as a gift (if so, gather recipients info)
14025
14061
 
14026
14062
 
@@ -14112,7 +14148,7 @@ function SelectModalWithHook(props) {
14112
14148
  resetView,
14113
14149
  view,
14114
14150
  set
14115
- } = usePelcro();
14151
+ } = usePelcro$1();
14116
14152
  const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
14117
14153
  const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
14118
14154
  return /*#__PURE__*/React__default.createElement(SelectModalWithTrans, {
@@ -14384,7 +14420,7 @@ class SelectModal extends Component {
14384
14420
  const {
14385
14421
  switchToAddressView,
14386
14422
  switchToPaymentView
14387
- } = usePelcro.getStore();
14423
+ } = usePelcro$1.getStore();
14388
14424
 
14389
14425
  if (!isAuthenticated) {
14390
14426
  return setView("register");
@@ -16587,16 +16623,16 @@ const PaymentMethodContainerWithoutStripe = ({
16587
16623
  const {
16588
16624
  t
16589
16625
  } = useTranslation("payment");
16590
- const pelcroStore = usePelcro();
16626
+ const pelcroStore = usePelcro$1();
16591
16627
  const {
16592
16628
  set,
16593
16629
  order,
16594
16630
  selectedPaymentMethodId,
16595
16631
  couponCode
16596
- } = usePelcro();
16632
+ } = usePelcro$1();
16597
16633
  const {
16598
16634
  whenUserReady
16599
- } = usePelcro.getStore();
16635
+ } = usePelcro$1.getStore();
16600
16636
  const product = (_props$product = props.product) !== null && _props$product !== void 0 ? _props$product : pelcroStore.product;
16601
16637
  const plan = (_props$plan = props.plan) !== null && _props$plan !== void 0 ? _props$plan : pelcroStore.plan;
16602
16638
  const subscriptionIdToRenew = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : pelcroStore.subscriptionIdToRenew;
@@ -18060,11 +18096,11 @@ const PaymentMethodContainerWithoutStripe = ({
18060
18096
 
18061
18097
  if (show) {
18062
18098
  injectCardAuthenticationIframe(source);
18063
- cardAuthContainer.classList.remove("plc-hidden");
18064
- cardAuthContainer.classList.add("plc-flex");
18099
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.remove("plc-hidden");
18100
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.add("plc-flex");
18065
18101
  } else {
18066
- cardAuthContainer.classList.add("plc-hidden");
18067
- cardAuthContainer.classList.remove("plc-flex");
18102
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.add("plc-hidden");
18103
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.remove("plc-flex");
18068
18104
  }
18069
18105
  };
18070
18106
 
@@ -18072,11 +18108,11 @@ const PaymentMethodContainerWithoutStripe = ({
18072
18108
  const cardAuthContainer = document.querySelector(".card-authentication-success-container");
18073
18109
 
18074
18110
  if (show) {
18075
- cardAuthContainer.classList.remove("plc-hidden");
18076
- cardAuthContainer.classList.add("plc-flex");
18111
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.remove("plc-hidden");
18112
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.add("plc-flex");
18077
18113
  } else {
18078
- cardAuthContainer.classList.add("plc-hidden");
18079
- cardAuthContainer.classList.remove("plc-flex");
18114
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.add("plc-hidden");
18115
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.remove("plc-flex");
18080
18116
  }
18081
18117
  };
18082
18118
 
@@ -18087,7 +18123,7 @@ const PaymentMethodContainerWithoutStripe = ({
18087
18123
  const iframe = document.createElement("iframe");
18088
18124
  iframe.src = source !== null && source !== void 0 && (_source$redirect = source.redirect) !== null && _source$redirect !== void 0 && _source$redirect.url ? source.redirect.url : source.threeDSecure_url;
18089
18125
  iframe.style = "position: absolute; width: 100%; height: 100%; left: 0; top: 0; bottom: 0; z-index: 10;";
18090
- cardAuthContainer.appendChild(iframe);
18126
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.appendChild(iframe);
18091
18127
  };
18092
18128
 
18093
18129
  const [state, dispatch] = useReducerWithSideEffects((state, action) => {
@@ -18276,7 +18312,7 @@ const PaymentMethodContainer = props => {
18276
18312
  const [isStripeLoaded, setIsStripeLoaded] = useState(Boolean(window.Stripe));
18277
18313
  const {
18278
18314
  whenUserReady
18279
- } = usePelcro.getStore();
18315
+ } = usePelcro$1.getStore();
18280
18316
  useEffect(() => {
18281
18317
  whenUserReady(() => {
18282
18318
  if (!window.Stripe) {
@@ -18377,7 +18413,7 @@ const PelcroPaymentRequestButton = props => {
18377
18413
  const CheckoutForm = () => {
18378
18414
  const {
18379
18415
  selectedPaymentMethodId
18380
- } = usePelcro();
18416
+ } = usePelcro$1();
18381
18417
  const cardProcessor = getSiteCardProcessor();
18382
18418
 
18383
18419
  if (selectedPaymentMethodId) {
@@ -18432,7 +18468,7 @@ const DiscountedPrice = props => {
18432
18468
  const {
18433
18469
  order,
18434
18470
  plan
18435
- } = usePelcro();
18471
+ } = usePelcro$1();
18436
18472
  const isTaxInclusive = (_window$Pelcro$site = window.Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : (_window$Pelcro$site$r = _window$Pelcro$site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tax_inclusive;
18437
18473
  const ecommOrderCurrency = (_order$currency = order === null || order === void 0 ? void 0 : order.currency) !== null && _order$currency !== void 0 ? _order$currency : order === null || order === void 0 ? void 0 : (_order$ = order[0]) === null || _order$ === void 0 ? void 0 : _order$.currency;
18438
18474
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
@@ -18468,7 +18504,7 @@ const SubmitPaymentMethod = ({
18468
18504
 
18469
18505
  const {
18470
18506
  plan
18471
- } = usePelcro();
18507
+ } = usePelcro$1();
18472
18508
  const {
18473
18509
  t
18474
18510
  } = useTranslation("checkoutForm");
@@ -18900,7 +18936,7 @@ const PaypalSubscribeButton = props => {
18900
18936
  plan,
18901
18937
  invoice,
18902
18938
  selectedAddressId
18903
- } = usePelcro();
18939
+ } = usePelcro$1();
18904
18940
  useEffect(() => {
18905
18941
  var _ref, _ref2, _state$updatedPrice, _props$plan, _props$selectedAddres;
18906
18942
 
@@ -19042,7 +19078,7 @@ const SelectedPaymentMethod = () => {
19042
19078
  const {
19043
19079
  switchView,
19044
19080
  selectedPaymentMethodId
19045
- } = usePelcro();
19081
+ } = usePelcro$1();
19046
19082
  const paymentMethod = (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : (_window$Pelcro$user$r2 = _window$Pelcro$user$r.sources) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : (_window$Pelcro$user$r3 = _window$Pelcro$user$r2.find) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.call(_window$Pelcro$user$r2, source => {
19047
19083
  return source.id == selectedPaymentMethodId;
19048
19084
  });
@@ -19083,7 +19119,7 @@ const TaxAmount = () => {
19083
19119
  } = useContext(store$k);
19084
19120
  const {
19085
19121
  plan
19086
- } = usePelcro();
19122
+ } = usePelcro$1();
19087
19123
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
19088
19124
  const priceFormatted = getFormattedPriceByLocal(taxAmount * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
19089
19125
  const isTaxInclusive = (_window$Pelcro$site = window.Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : (_window$Pelcro$site$r = _window$Pelcro$site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tax_inclusive;
@@ -19229,7 +19265,7 @@ const SubscriptionRenewView = ({
19229
19265
  const {
19230
19266
  product,
19231
19267
  plan
19232
- } = usePelcro();
19268
+ } = usePelcro$1();
19233
19269
  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;
19234
19270
  const showSubscriptionButton = skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0;
19235
19271
 
@@ -19284,7 +19320,7 @@ function SubscriptionRenewModal({
19284
19320
  }) {
19285
19321
  const {
19286
19322
  switchView
19287
- } = usePelcro();
19323
+ } = usePelcro$1();
19288
19324
 
19289
19325
  const onSuccess = res => {
19290
19326
  var _otherProps$onSuccess, _ReactGA$event;
@@ -19489,7 +19525,7 @@ const SubscriptionCancelNowButton = ({
19489
19525
  }) => {
19490
19526
  const {
19491
19527
  switchView
19492
- } = usePelcro();
19528
+ } = usePelcro$1();
19493
19529
  const {
19494
19530
  state: {
19495
19531
  cancelationReason
@@ -19536,7 +19572,7 @@ const SubscriptionCancelNowButton = ({
19536
19572
 
19537
19573
  switchView(null); //Show confirmation alert after closing the modal
19538
19574
 
19539
- notify.confirm((onSuccess, onFailure) => {
19575
+ notify$1.confirm((onSuccess, onFailure) => {
19540
19576
  cancelSubscription(payload, onSuccess, onFailure);
19541
19577
  }, {
19542
19578
  confirmMessage: t("messages.subCancellation.isSureToCancelNow"),
@@ -19561,7 +19597,7 @@ const SubscriptionCancelLaterButton = ({
19561
19597
  }) => {
19562
19598
  const {
19563
19599
  switchView
19564
- } = usePelcro();
19600
+ } = usePelcro$1();
19565
19601
  const {
19566
19602
  state: {
19567
19603
  cancelationReason
@@ -19608,7 +19644,7 @@ const SubscriptionCancelLaterButton = ({
19608
19644
 
19609
19645
  switchView(null); //Show confirmation alert after closing the modal
19610
19646
 
19611
- notify.confirm((onSuccess, onFailure) => {
19647
+ notify$1.confirm((onSuccess, onFailure) => {
19612
19648
  cancelSubscription(payload, onSuccess, onFailure);
19613
19649
  }, {
19614
19650
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
@@ -19629,7 +19665,7 @@ const SubscriptionCancelLaterButton = ({
19629
19665
  const SubscriptionCancelView = props => {
19630
19666
  const {
19631
19667
  subscriptionToCancel
19632
- } = usePelcro();
19668
+ } = usePelcro$1();
19633
19669
  const {
19634
19670
  t
19635
19671
  } = useTranslation("subscriptionCancel");
@@ -19803,7 +19839,7 @@ const SubscriptionSuspendButton = ({
19803
19839
  }) => {
19804
19840
  const {
19805
19841
  switchView
19806
- } = usePelcro();
19842
+ } = usePelcro$1();
19807
19843
  const {
19808
19844
  state: {
19809
19845
  suspendDate,
@@ -19845,7 +19881,7 @@ const SubscriptionSuspendButton = ({
19845
19881
 
19846
19882
  switchView(null); //Show confirmation alert after closing the modal
19847
19883
 
19848
- notify.confirm((onSuccess, onFailure) => {
19884
+ notify$1.confirm((onSuccess, onFailure) => {
19849
19885
  suspendSubscription(payload, onSuccess, onFailure);
19850
19886
  }, {
19851
19887
  confirmMessage: t("messages.subCancellation.isSureToSuspendNow"),
@@ -19867,7 +19903,7 @@ const SubscriptionSuspendButton = ({
19867
19903
  const SubscriptionSuspendView = props => {
19868
19904
  const {
19869
19905
  subscriptionToSuspend
19870
- } = usePelcro();
19906
+ } = usePelcro$1();
19871
19907
  const {
19872
19908
  t
19873
19909
  } = useTranslation("subscriptionSuspend");
@@ -19960,7 +19996,7 @@ const getCurrentFlow = () => {
19960
19996
  giftRecipient,
19961
19997
  giftCode,
19962
19998
  invoice
19963
- } = usePelcro.getStore();
19999
+ } = usePelcro$1.getStore();
19964
20000
 
19965
20001
  if (invoice) {
19966
20002
  return "invoicePayment";
@@ -19979,7 +20015,7 @@ const getSuccessContent = i18n => {
19979
20015
  const flow = getCurrentFlow();
19980
20016
  const {
19981
20017
  product
19982
- } = usePelcro.getStore();
20018
+ } = usePelcro$1.getStore();
19983
20019
  const wordingDictionary = {
19984
20020
  subscriptionSuccess: {
19985
20021
  successIcon: /*#__PURE__*/React__default.createElement(SvgCheckSolid, {
@@ -20023,7 +20059,7 @@ function PaymentSuccessModal({
20023
20059
  }) {
20024
20060
  const {
20025
20061
  resetView
20026
- } = usePelcro();
20062
+ } = usePelcro$1();
20027
20063
 
20028
20064
  const onClose = () => {
20029
20065
  var _props$onClose;
@@ -20056,7 +20092,7 @@ function NewsletterWithHook(props) {
20056
20092
  switchView,
20057
20093
  resetView,
20058
20094
  product
20059
- } = usePelcro();
20095
+ } = usePelcro$1();
20060
20096
  return /*#__PURE__*/React__default.createElement(NewsLetter, {
20061
20097
  onClose: () => {
20062
20098
  var _props$onClose;
@@ -20555,7 +20591,7 @@ const MeterView = () => {
20555
20591
  switchView,
20556
20592
  product,
20557
20593
  isAuthenticated
20558
- } = usePelcro();
20594
+ } = usePelcro$1();
20559
20595
  const paywallProduct = product !== null && product !== void 0 ? product : window.Pelcro.paywall.getProduct();
20560
20596
  const visitsLeft = window.Pelcro.paywall.freeVisitsLeft();
20561
20597
  const title = `${paywallProduct === null || paywallProduct === void 0 ? void 0 : (_paywallProduct$paywa = paywallProduct.paywall) === null || _paywallProduct$paywa === void 0 ? void 0 : _paywallProduct$paywa.meter_title}: ${visitsLeft}`;
@@ -20577,7 +20613,7 @@ const MeterView = () => {
20577
20613
  const MeterModal = props => {
20578
20614
  const {
20579
20615
  resetView
20580
- } = usePelcro();
20616
+ } = usePelcro$1();
20581
20617
  useEffect(() => {
20582
20618
  var _props$onDisplay;
20583
20619
 
@@ -20615,7 +20651,7 @@ const SubscriptionCreateView = ({
20615
20651
  const {
20616
20652
  product,
20617
20653
  plan
20618
- } = usePelcro();
20654
+ } = usePelcro$1();
20619
20655
  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;
20620
20656
  const showSubscriptionButton = skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0;
20621
20657
 
@@ -20673,7 +20709,7 @@ function SubscriptionCreateModal({
20673
20709
  useTranslation("common");
20674
20710
  const {
20675
20711
  switchView
20676
- } = usePelcro();
20712
+ } = usePelcro$1();
20677
20713
 
20678
20714
  const onSuccess = res => {
20679
20715
  var _otherProps$onSuccess;
@@ -20719,7 +20755,7 @@ const SubscriptionManageMembersContainer = ({
20719
20755
  }) => {
20720
20756
  const {
20721
20757
  subscriptionToManageMembers
20722
- } = usePelcro();
20758
+ } = usePelcro$1();
20723
20759
  const subscription_id = subscriptionToManageMembers === null || subscriptionToManageMembers === void 0 ? void 0 : subscriptionToManageMembers.id;
20724
20760
 
20725
20761
  const handleListMembers = ({}, dispatch) => {
@@ -21014,8 +21050,8 @@ function SubscriptionManageMembersList(props) {
21014
21050
  return {
21015
21051
  title: sub.status,
21016
21052
  content: sub.status,
21017
- textColor: "plc-text-orange-700",
21018
- bgColor: "plc-bg-orange-100",
21053
+ textColor: "plc-text-yellow-500",
21054
+ bgColor: "plc-bg-yellow-100",
21019
21055
  icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null)
21020
21056
  };
21021
21057
  }
@@ -21071,7 +21107,8 @@ function SubscriptionManageMembersList(props) {
21071
21107
  key: member.id,
21072
21108
  className: `plc-w-full plc-align-middle plc-cursor-pointer accordion-header hover:plc-bg-gray-50 plc-text-center`
21073
21109
  }, /*#__PURE__*/React__default.createElement("td", {
21074
- className: "plc-truncate"
21110
+ className: "plc-truncate plc-text-left",
21111
+ title: member === null || member === void 0 ? void 0 : member.invitation_email
21075
21112
  }, /*#__PURE__*/React__default.createElement("span", {
21076
21113
  className: "plc-font-semibold plc-text-gray-500"
21077
21114
  }, member === null || member === void 0 ? void 0 : member.invitation_email)), /*#__PURE__*/React__default.createElement("td", {
@@ -21125,8 +21162,10 @@ function SubscriptionManageMembersView(props) {
21125
21162
  className: "plc-flex-shrink-0 plc-p-2 plc-text-xs plc-text-gray-400 plc-uppercase"
21126
21163
  }, t("labels.listOfMembers")), /*#__PURE__*/React__default.createElement("hr", {
21127
21164
  className: "plc-w-full plc-border-gray-300"
21128
- })), /*#__PURE__*/React__default.createElement("table", {
21129
- className: "plc-w-full plc-table-fixed"
21165
+ })), /*#__PURE__*/React__default.createElement("div", {
21166
+ className: "plc-max-h-48 plc-overflow-x-hidden plc-overflow-y-auto"
21167
+ }, /*#__PURE__*/React__default.createElement("table", {
21168
+ className: "plc-w-full plc-table-fixed plc-text-center plc-p-2 plc-m-1"
21130
21169
  }, /*#__PURE__*/React__default.createElement("thead", {
21131
21170
  className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
21132
21171
  }, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
@@ -21135,7 +21174,7 @@ function SubscriptionManageMembersView(props) {
21135
21174
  className: "plc-w-3/12 "
21136
21175
  }, t("labels.status")), /*#__PURE__*/React__default.createElement("th", {
21137
21176
  className: "plc-w-3/12 "
21138
- }, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement(SubscriptionManageMembersList, null)))))));
21177
+ }, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement(SubscriptionManageMembersList, null))))))));
21139
21178
  }
21140
21179
 
21141
21180
  /**
@@ -21164,7 +21203,7 @@ function SubscriptionManageMembersModal({
21164
21203
  }
21165
21204
  SubscriptionManageMembersModal.viewId = "manage-members";
21166
21205
 
21167
- var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5, _window$Pelcro$user$r6;
21206
+ var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5, _window$Pelcro$user$r6, _window$Pelcro$user$r7;
21168
21207
  const initialState$f = {
21169
21208
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
21170
21209
  emailError: null,
@@ -21172,10 +21211,12 @@ const initialState$f = {
21172
21211
  firstNameError: null,
21173
21212
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
21174
21213
  lastNameError: null,
21175
- displayName: (_window$Pelcro$user$r4 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r4 === void 0 ? void 0 : _window$Pelcro$user$r4.display_name,
21176
- phone: (_window$Pelcro$user$r5 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r5 === void 0 ? void 0 : _window$Pelcro$user$r5.phone,
21214
+ username: (_window$Pelcro$user$r4 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r4 === void 0 ? void 0 : _window$Pelcro$user$r4.username,
21215
+ usernameError: null,
21216
+ displayName: (_window$Pelcro$user$r5 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r5 === void 0 ? void 0 : _window$Pelcro$user$r5.display_name,
21217
+ phone: (_window$Pelcro$user$r6 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r6 === void 0 ? void 0 : _window$Pelcro$user$r6.phone,
21177
21218
  phoneError: null,
21178
- tin: (_window$Pelcro$user$r6 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r6 === void 0 ? void 0 : _window$Pelcro$user$r6.tin,
21219
+ tin: (_window$Pelcro$user$r7 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r7 === void 0 ? void 0 : _window$Pelcro$user$r7.tin,
21179
21220
  buttonDisabled: false,
21180
21221
  textFields: {},
21181
21222
  alert: {
@@ -21206,26 +21247,29 @@ const UserUpdateContainer = ({
21206
21247
  }, []);
21207
21248
 
21208
21249
  const loadUserDataIntoFields = () => {
21209
- var _window$Pelcro$user$r7, _window$Pelcro$user$r8, _window$Pelcro$user$r9, _window$Pelcro$user$r10, _window$Pelcro$user$r11, _window$Pelcro$user$r12;
21250
+ var _window$Pelcro$user$r8, _window$Pelcro$user$r9, _window$Pelcro$user$r10, _window$Pelcro$user$r11, _window$Pelcro$user$r12, _window$Pelcro$user$r13, _window$Pelcro$user$r14;
21210
21251
 
21211
21252
  const fields = [{
21212
21253
  type: SET_EMAIL,
21213
- payload: (_window$Pelcro$user$r7 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r7 === void 0 ? void 0 : _window$Pelcro$user$r7.email
21254
+ payload: (_window$Pelcro$user$r8 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r8 === void 0 ? void 0 : _window$Pelcro$user$r8.email
21214
21255
  }, {
21215
21256
  type: SET_FIRST_NAME,
21216
- payload: (_window$Pelcro$user$r8 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r8 === void 0 ? void 0 : _window$Pelcro$user$r8.first_name
21257
+ payload: (_window$Pelcro$user$r9 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r9 === void 0 ? void 0 : _window$Pelcro$user$r9.first_name
21217
21258
  }, {
21218
21259
  type: SET_LAST_NAME,
21219
- payload: (_window$Pelcro$user$r9 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r9 === void 0 ? void 0 : _window$Pelcro$user$r9.last_name
21260
+ payload: (_window$Pelcro$user$r10 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r10 === void 0 ? void 0 : _window$Pelcro$user$r10.last_name
21261
+ }, {
21262
+ type: SET_USERNAME,
21263
+ payload: (_window$Pelcro$user$r11 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r11 === void 0 ? void 0 : _window$Pelcro$user$r11.username
21220
21264
  }, {
21221
21265
  type: SET_DISPLAY_NAME,
21222
- payload: (_window$Pelcro$user$r10 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r10 === void 0 ? void 0 : _window$Pelcro$user$r10.display_name
21266
+ payload: (_window$Pelcro$user$r12 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r12 === void 0 ? void 0 : _window$Pelcro$user$r12.display_name
21223
21267
  }, {
21224
21268
  type: SET_PHONE,
21225
- payload: (_window$Pelcro$user$r11 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r11 === void 0 ? void 0 : _window$Pelcro$user$r11.phone
21269
+ payload: (_window$Pelcro$user$r13 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r13 === void 0 ? void 0 : _window$Pelcro$user$r13.phone
21226
21270
  }, {
21227
21271
  type: SET_TIN,
21228
- payload: (_window$Pelcro$user$r12 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r12 === void 0 ? void 0 : _window$Pelcro$user$r12.tin
21272
+ payload: (_window$Pelcro$user$r14 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r14 === void 0 ? void 0 : _window$Pelcro$user$r14.tin
21229
21273
  }];
21230
21274
  fields.filter(field => Boolean(field.payload)).forEach(field => {
21231
21275
  dispatch(field);
@@ -21236,6 +21280,7 @@ const UserUpdateContainer = ({
21236
21280
  email,
21237
21281
  firstName,
21238
21282
  lastName,
21283
+ username,
21239
21284
  phone,
21240
21285
  tin,
21241
21286
  textFields,
@@ -21246,6 +21291,9 @@ const UserUpdateContainer = ({
21246
21291
  email: email,
21247
21292
  first_name: firstName,
21248
21293
  last_name: lastName,
21294
+ ...(username && {
21295
+ username
21296
+ }),
21249
21297
  display_name: displayName,
21250
21298
  phone: phone,
21251
21299
  tin: tin,
@@ -21331,6 +21379,18 @@ const UserUpdateContainer = ({
21331
21379
  lastName: ""
21332
21380
  });
21333
21381
 
21382
+ case SET_USERNAME:
21383
+ return lib_7({ ...state,
21384
+ username: action.payload,
21385
+ usernameError: null
21386
+ });
21387
+
21388
+ case SET_USERNAME_ERROR:
21389
+ return lib_7({ ...state,
21390
+ usernameError: action.payload,
21391
+ username: ""
21392
+ });
21393
+
21334
21394
  case SET_PHONE:
21335
21395
  return lib_7({ ...state,
21336
21396
  phone: action.payload,
@@ -21376,10 +21436,14 @@ const UserUpdateContainer = ({
21376
21436
  state,
21377
21437
  dispatch
21378
21438
  }
21379
- }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
21380
- store: store$f,
21381
- key: i
21382
- })) : /*#__PURE__*/React__default.cloneElement(children, {
21439
+ }, children.length ? children.map((child, i) => {
21440
+ if (child) {
21441
+ return /*#__PURE__*/React__default.cloneElement(child, {
21442
+ store: store$f,
21443
+ key: i
21444
+ });
21445
+ }
21446
+ }) : /*#__PURE__*/React__default.cloneElement(children, {
21383
21447
  store: store$f
21384
21448
  })));
21385
21449
  };
@@ -21487,6 +21551,84 @@ const UserUpdateButton = ({
21487
21551
  }, otherProps), name !== null && name !== void 0 ? name : t("labels.submit"));
21488
21552
  };
21489
21553
 
21554
+ function UpdateUserNameInput({
21555
+ initWithUserName = true,
21556
+ store,
21557
+ ...otherProps
21558
+ }) {
21559
+ const {
21560
+ t
21561
+ } = useTranslation("common");
21562
+ const {
21563
+ dispatch,
21564
+ state: {
21565
+ username: stateUsername,
21566
+ usernameError
21567
+ }
21568
+ } = useContext(store);
21569
+ const [username, setUsername] = useState(stateUsername);
21570
+ const [finishedTyping, setFinishedTyping] = useState(false);
21571
+ const handleInputChange = useCallback(value => {
21572
+ setUsername(value);
21573
+
21574
+ if (finishedTyping) {
21575
+ if (username !== null && username !== void 0 && username.length) {
21576
+ dispatch({
21577
+ type: SET_USERNAME,
21578
+ payload: username
21579
+ });
21580
+ } else {
21581
+ if (otherProps.required) {
21582
+ dispatch({
21583
+ type: SET_USERNAME_ERROR,
21584
+ payload: t("validation.enterUsername")
21585
+ });
21586
+ } else {
21587
+ dispatch({
21588
+ type: SET_USERNAME,
21589
+ payload: username
21590
+ });
21591
+ }
21592
+ }
21593
+ }
21594
+ }, [dispatch, username, finishedTyping]);
21595
+ useEffect(() => {
21596
+ handleInputChange(username);
21597
+ }, [finishedTyping, username, handleInputChange]); // Initialize username field with user's username
21598
+
21599
+ const loadFirstNameIntoField = () => {
21600
+ handleInputChange(window.Pelcro.user.read().username);
21601
+ dispatch({
21602
+ type: SET_USERNAME,
21603
+ payload: window.Pelcro.user.read().username
21604
+ });
21605
+ };
21606
+
21607
+ useEffect(() => {
21608
+ if (initWithUserName) {
21609
+ document.addEventListener("PelcroUserLoaded", () => {
21610
+ loadFirstNameIntoField();
21611
+ });
21612
+ loadFirstNameIntoField();
21613
+ return () => {
21614
+ document.removeEventListener("PelcroUserLoaded", handleInputChange);
21615
+ };
21616
+ }
21617
+ }, []);
21618
+ return /*#__PURE__*/React__default.createElement(Input, Object.assign({
21619
+ type: "text",
21620
+ error: usernameError,
21621
+ value: username,
21622
+ onChange: e => handleInputChange(e.target.value),
21623
+ onBlur: () => setFinishedTyping(true),
21624
+ onFocus: () => setFinishedTyping(false)
21625
+ }, otherProps));
21626
+ }
21627
+
21628
+ const UserUpdateUsername = props => /*#__PURE__*/React__default.createElement(UpdateUserNameInput, Object.assign({
21629
+ store: store$f
21630
+ }, props));
21631
+
21490
21632
  const UserUpdateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
21491
21633
  store: store$f
21492
21634
  }, props));
@@ -21586,13 +21728,45 @@ const UserUpdateTin = props => /*#__PURE__*/React__default.createElement(Tin, Ob
21586
21728
  store: store$f
21587
21729
  }, props));
21588
21730
 
21731
+ function DisplayName({
21732
+ store,
21733
+ ...otherProps
21734
+ }) {
21735
+ const {
21736
+ dispatch,
21737
+ state
21738
+ } = useContext(store);
21739
+
21740
+ const handleInputChange = value => {
21741
+ dispatch({
21742
+ type: SET_DISPLAY_NAME,
21743
+ payload: value
21744
+ });
21745
+ };
21746
+
21747
+ if (state.loading) {
21748
+ return /*#__PURE__*/React__default.createElement(Loader, null);
21749
+ }
21750
+
21751
+ return /*#__PURE__*/React__default.createElement(Input, Object.assign({
21752
+ type: "text",
21753
+ value: state.displayName || null,
21754
+ onChange: e => handleInputChange(e.target.value)
21755
+ }, otherProps));
21756
+ }
21757
+
21758
+ const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
21759
+ store: store$f
21760
+ }, props));
21761
+
21589
21762
  const UserUpdateView = props => {
21590
- var _window$Pelcro$site$r;
21763
+ var _window$Pelcro$site$r, _window$Pelcro, _window$Pelcro$uiSett;
21591
21764
 
21592
21765
  const {
21593
21766
  t
21594
21767
  } = useTranslation("userEdit");
21595
21768
  const supportsTap = Boolean((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tap_gateway_settings);
21769
+ const showUsernameInput = (_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.enableLoginWithUsername;
21596
21770
  return /*#__PURE__*/React__default.createElement("div", {
21597
21771
  id: "pelcro-user-update-view"
21598
21772
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -21620,7 +21794,17 @@ const UserUpdateView = props => {
21620
21794
  errorId: "pelcro-input-last-name-error",
21621
21795
  label: t("labels.lastName"),
21622
21796
  required: supportsTap ? true : false
21623
- })), /*#__PURE__*/React__default.createElement("div", {
21797
+ })), /*#__PURE__*/React__default.createElement(UserUpdateDisplayName, {
21798
+ id: "pelcro-input-display-name",
21799
+ autoComplete: "display-name",
21800
+ errorId: "pelcro-input-display-name-error",
21801
+ label: t("labels.displayname")
21802
+ }), showUsernameInput && /*#__PURE__*/React__default.createElement(UserUpdateUsername, {
21803
+ id: "pelcro-input-user-name",
21804
+ autoComplete: "user-name",
21805
+ errorId: "pelcro-input-user-name-error",
21806
+ label: t("labels.username")
21807
+ }), /*#__PURE__*/React__default.createElement("div", {
21624
21808
  className: "plc-flex plc-items-start"
21625
21809
  }, /*#__PURE__*/React__default.createElement(UserUpdatePhone, {
21626
21810
  id: "pelcro-input-phone",
@@ -21651,7 +21835,7 @@ function UserUpdateModal({
21651
21835
  }) {
21652
21836
  const {
21653
21837
  switchView
21654
- } = usePelcro();
21838
+ } = usePelcro$1();
21655
21839
 
21656
21840
  const onPictureClick = () => {
21657
21841
  switchView("profile-picture");
@@ -21667,37 +21851,6 @@ function UserUpdateModal({
21667
21851
  }
21668
21852
  UserUpdateModal.viewId = "user-edit";
21669
21853
 
21670
- function DisplayName({
21671
- store,
21672
- ...otherProps
21673
- }) {
21674
- const {
21675
- dispatch,
21676
- state
21677
- } = useContext(store);
21678
-
21679
- const handleInputChange = value => {
21680
- dispatch({
21681
- type: SET_DISPLAY_NAME,
21682
- payload: value
21683
- });
21684
- };
21685
-
21686
- if (state.loading) {
21687
- return /*#__PURE__*/React__default.createElement(Loader, null);
21688
- }
21689
-
21690
- return /*#__PURE__*/React__default.createElement(Input, Object.assign({
21691
- type: "text",
21692
- value: state.displayName || null,
21693
- onChange: e => handleInputChange(e.target.value)
21694
- }, otherProps));
21695
- }
21696
-
21697
- const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
21698
- store: store$f
21699
- }, props));
21700
-
21701
21854
  const UserUpdateTextInput = props => {
21702
21855
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
21703
21856
  store: store$f
@@ -21760,7 +21913,7 @@ const AddressCreateContainer = ({
21760
21913
  order,
21761
21914
  set,
21762
21915
  selectedMembership
21763
- } = usePelcro();
21916
+ } = usePelcro$1();
21764
21917
  const giftCode = (_props$giftCode = props.giftCode) !== null && _props$giftCode !== void 0 ? _props$giftCode : giftCodeFromStore;
21765
21918
  const subscriptionIdToRenew = (_ref = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref !== void 0 ? _ref : undefined;
21766
21919
  useEffect(() => {
@@ -21865,7 +22018,7 @@ const AddressCreateContainer = ({
21865
22018
  return onFailure(err);
21866
22019
  }
21867
22020
 
21868
- notify.success(t("messages.addressUpdated"));
22021
+ notify$1.success(t("messages.addressUpdated"));
21869
22022
  return onMembershipAdressUpdateSuccess(res);
21870
22023
  });
21871
22024
  }
@@ -22517,7 +22670,7 @@ const AddressCreateModal = ({
22517
22670
  switchView,
22518
22671
  switchToPaymentView,
22519
22672
  resetView
22520
- } = usePelcro();
22673
+ } = usePelcro$1();
22521
22674
 
22522
22675
  const onSuccess = newAddressId => {
22523
22676
  var _otherProps$onSuccess;
@@ -22610,7 +22763,7 @@ const AddressUpdateContainer = ({
22610
22763
 
22611
22764
  const {
22612
22765
  addressIdToEdit
22613
- } = usePelcro();
22766
+ } = usePelcro$1();
22614
22767
  const addressId = (_props$addressId = props === null || props === void 0 ? void 0 : props.addressId) !== null && _props$addressId !== void 0 ? _props$addressId : addressIdToEdit;
22615
22768
  const [t] = useTranslation("address");
22616
22769
  useEffect(() => {
@@ -23701,7 +23854,7 @@ const PasswordForgotModal = ({
23701
23854
  } = useTranslation("passwordForgot");
23702
23855
  const {
23703
23856
  switchView
23704
- } = usePelcro();
23857
+ } = usePelcro$1();
23705
23858
  return /*#__PURE__*/React__default.createElement(Modal, {
23706
23859
  id: "pelcro-password-forgot-modal",
23707
23860
  onDisplay: onDisplay,
@@ -24286,7 +24439,7 @@ const CartContainer = ({
24286
24439
  const {
24287
24440
  cartItems,
24288
24441
  set
24289
- } = usePelcro();
24442
+ } = usePelcro$1();
24290
24443
  const {
24291
24444
  t
24292
24445
  } = useTranslation("shop");
@@ -24391,7 +24544,7 @@ const CartRemoveItemButton = ({
24391
24544
  }) => {
24392
24545
  const {
24393
24546
  removeFromCart
24394
- } = usePelcro();
24547
+ } = usePelcro$1();
24395
24548
  return /*#__PURE__*/React__default.createElement(Button, Object.assign({
24396
24549
  variant: "icon",
24397
24550
  "data-key": itemId,
@@ -24454,7 +24607,7 @@ const CartTotalPrice = () => {
24454
24607
  } = useContext(store$8);
24455
24608
  const {
24456
24609
  cartItems
24457
- } = usePelcro();
24610
+ } = usePelcro$1();
24458
24611
  const totalPriceCurrency = cartItems[0].currency;
24459
24612
  const {
24460
24613
  t
@@ -24474,7 +24627,7 @@ const CartTotalPrice = () => {
24474
24627
  const CartView = props => {
24475
24628
  const {
24476
24629
  cartItems
24477
- } = usePelcro();
24630
+ } = usePelcro$1();
24478
24631
  const {
24479
24632
  t
24480
24633
  } = useTranslation("cart");
@@ -24535,7 +24688,7 @@ const CartModal = ({
24535
24688
  switchView,
24536
24689
  switchToAddressView,
24537
24690
  isAuthenticated
24538
- } = usePelcro();
24691
+ } = usePelcro$1();
24539
24692
 
24540
24693
  const onSuccess = items => {
24541
24694
  var _otherProps$onSuccess;
@@ -24567,7 +24720,7 @@ const ShopSelectProductButton = ({
24567
24720
  }) => {
24568
24721
  const {
24569
24722
  addToCart
24570
- } = usePelcro();
24723
+ } = usePelcro$1();
24571
24724
  const {
24572
24725
  t
24573
24726
  } = useTranslation("shop");
@@ -24599,7 +24752,7 @@ const ShopPurchaseButton = ({
24599
24752
  }) => {
24600
24753
  const {
24601
24754
  purchaseItem
24602
- } = usePelcro();
24755
+ } = usePelcro$1();
24603
24756
  const {
24604
24757
  t
24605
24758
  } = useTranslation("shop");
@@ -24635,7 +24788,7 @@ const ShopView = () => {
24635
24788
  className: "plc-mt-2"
24636
24789
  }), /*#__PURE__*/React__default.createElement(ShopPurchaseButton, {
24637
24790
  itemId: item.id,
24638
- className: "plc-mt-2"
24791
+ className: "plc-mt-2 pelcro-purchase-button"
24639
24792
  })));
24640
24793
  })));
24641
24794
  };
@@ -24675,7 +24828,7 @@ const OrderCreateModal = ({
24675
24828
  }) => {
24676
24829
  const {
24677
24830
  switchView
24678
- } = usePelcro();
24831
+ } = usePelcro$1();
24679
24832
 
24680
24833
  const onSuccess = () => {
24681
24834
  var _otherProps$onSuccess;
@@ -24705,7 +24858,7 @@ const OrderConfirmModal = props => {
24705
24858
  } = useTranslation("shop");
24706
24859
  const {
24707
24860
  resetView
24708
- } = usePelcro();
24861
+ } = usePelcro$1();
24709
24862
 
24710
24863
  const onClose = () => {
24711
24864
  var _props$onClose;
@@ -24797,7 +24950,7 @@ const GiftCreateContainer = ({
24797
24950
  } = useTranslation("register");
24798
24951
  const {
24799
24952
  set
24800
- } = usePelcro();
24953
+ } = usePelcro$1();
24801
24954
 
24802
24955
  const handleSubmit = (state, dispatch) => {
24803
24956
  const giftRecipient = {
@@ -25089,7 +25242,7 @@ const GiftCreateModal = ({
25089
25242
  switchToAddressView,
25090
25243
  switchToPaymentView,
25091
25244
  product
25092
- } = usePelcro();
25245
+ } = usePelcro$1();
25093
25246
 
25094
25247
  const onSuccess = giftRecipient => {
25095
25248
  var _otherProps$onSuccess;
@@ -25117,6 +25270,7 @@ const GiftCreateModal = ({
25117
25270
  GiftCreateModal.viewId = "gift-create";
25118
25271
 
25119
25272
  const initialState$6 = {
25273
+ isSubmitting: false,
25120
25274
  giftCode: "",
25121
25275
  buttonDisabled: true,
25122
25276
  alert: {
@@ -25135,14 +25289,24 @@ const GiftRedeemContainer = ({
25135
25289
  onSuccess = () => {},
25136
25290
  onFailure = () => {},
25137
25291
  onDisplay = () => {},
25138
- children
25292
+ children,
25293
+ ...props
25139
25294
  }) => {
25295
+ var _ref, _props$subscriptionId;
25296
+
25140
25297
  const {
25141
25298
  t
25142
25299
  } = useTranslation("register");
25143
25300
  const {
25144
25301
  set
25145
- } = usePelcro();
25302
+ } = usePelcro$1();
25303
+ const {
25304
+ switchView,
25305
+ switchToAddressView,
25306
+ isAuthenticated,
25307
+ subscriptionIdToRenew: subscriptionIdToRenewFromStore
25308
+ } = usePelcro$1();
25309
+ const subscriptionIdToRenew = (_ref = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref !== void 0 ? _ref : undefined;
25146
25310
  useEffect(() => {
25147
25311
  onDisplay();
25148
25312
  }, []);
@@ -25163,7 +25327,41 @@ const GiftRedeemContainer = ({
25163
25327
  set({
25164
25328
  giftCode
25165
25329
  });
25166
- onSuccess(giftCode);
25330
+
25331
+ if (!isAuthenticated()) {
25332
+ switchView("register");
25333
+ } else {
25334
+ console.log("Shaker");
25335
+ window.Pelcro.subscription.redeemGift({
25336
+ auth_token: window.Pelcro.user.read().auth_token,
25337
+ gift_code: giftCode,
25338
+ // redeem gift as a future phase of an existing subscription
25339
+ subscription_id: subscriptionIdToRenew
25340
+ }, (err, res) => {
25341
+ dispatch({
25342
+ type: LOADING,
25343
+ payload: false
25344
+ });
25345
+
25346
+ if (err) {
25347
+ dispatch({
25348
+ type: SHOW_ALERT,
25349
+ payload: {
25350
+ type: "error",
25351
+ content: getErrorMessages(err)
25352
+ }
25353
+ });
25354
+
25355
+ if (getErrorMessages(err) === "Address ID is required") {
25356
+ switchToAddressView();
25357
+ } else {
25358
+ return onFailure(err);
25359
+ }
25360
+ } else {
25361
+ return onSuccess(giftCode);
25362
+ }
25363
+ });
25364
+ }
25167
25365
  }
25168
25366
  };
25169
25367
 
@@ -25184,8 +25382,14 @@ const GiftRedeemContainer = ({
25184
25382
  buttonDisabled: action.payload
25185
25383
  });
25186
25384
 
25385
+ case LOADING:
25386
+ return lib_7({ ...state,
25387
+ isSubmitting: action.payload
25388
+ });
25389
+
25187
25390
  case HANDLE_SUBMIT:
25188
25391
  return lib_5({ ...state,
25392
+ isSubmitting: true,
25189
25393
  buttonDisabled: true
25190
25394
  }, (state, dispatch) => handleRedeem(state, dispatch));
25191
25395
 
@@ -25254,7 +25458,8 @@ const GiftRedeemSubmitButton = ({
25254
25458
  const {
25255
25459
  dispatch,
25256
25460
  state: {
25257
- disableSubmit
25461
+ disableSubmit,
25462
+ isSubmitting
25258
25463
  }
25259
25464
  } = useContext(store$6);
25260
25465
  const {
@@ -25267,7 +25472,8 @@ const GiftRedeemSubmitButton = ({
25267
25472
  });
25268
25473
  onClick === null || onClick === void 0 ? void 0 : onClick();
25269
25474
  },
25270
- disabled: disableSubmit
25475
+ disabled: disableSubmit,
25476
+ isLoading: isSubmitting
25271
25477
  }, otherProps), name !== null && name !== void 0 ? name : t("redeem.buttons.redeem"));
25272
25478
  };
25273
25479
 
@@ -25312,18 +25518,13 @@ const GiftRedeemModal = ({
25312
25518
  switchView,
25313
25519
  switchToAddressView,
25314
25520
  isAuthenticated
25315
- } = usePelcro();
25521
+ } = usePelcro$1();
25316
25522
 
25317
25523
  const onSuccess = giftCode => {
25318
25524
  var _otherProps$onSuccess;
25319
25525
 
25320
25526
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, giftCode);
25321
-
25322
- if (isAuthenticated()) {
25323
- switchToAddressView();
25324
- } else {
25325
- switchView("register");
25326
- }
25527
+ switchView("subscription-success");
25327
25528
  };
25328
25529
 
25329
25530
  return /*#__PURE__*/React__default.createElement(Modal, {
@@ -25384,7 +25585,7 @@ const AddressSelectContainer = ({
25384
25585
  subscriptionIdToRenew: subscriptionIdToRenewFromStore,
25385
25586
  set,
25386
25587
  selectedMembership
25387
- } = usePelcro();
25588
+ } = usePelcro$1();
25388
25589
  const giftCode = (_props$giftCode = props.giftCode) !== null && _props$giftCode !== void 0 ? _props$giftCode : giftCodeFromStore;
25389
25590
  const subscriptionIdToRenew = (_ref = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref !== void 0 ? _ref : undefined;
25390
25591
 
@@ -25421,7 +25622,7 @@ const AddressSelectContainer = ({
25421
25622
  return onFailure(err);
25422
25623
  }
25423
25624
 
25424
- notify.success(t("messages.addressUpdated"));
25625
+ notify$1.success(t("messages.addressUpdated"));
25425
25626
  return onMembershipAdressUpdateSuccess(res);
25426
25627
  });
25427
25628
  }
@@ -25626,7 +25827,7 @@ const AddressSelectModal = ({
25626
25827
  switchView,
25627
25828
  switchToPaymentView,
25628
25829
  resetView
25629
- } = usePelcro();
25830
+ } = usePelcro$1();
25630
25831
 
25631
25832
  const onSuccess = selectedAddressId => {
25632
25833
  var _otherProps$onSuccess;
@@ -25704,7 +25905,7 @@ const PaymentMethodSelectContainer = ({
25704
25905
  const {
25705
25906
  set,
25706
25907
  selectedPaymentMethodId: selectedPaymentMethodIdFromStore
25707
- } = usePelcro();
25908
+ } = usePelcro$1();
25708
25909
 
25709
25910
  const submitPaymentMethod = ({
25710
25911
  selectedPaymentMethodId
@@ -25887,7 +26088,7 @@ const PaymentMethodSelectModal = ({
25887
26088
  switchToCheckoutForm,
25888
26089
  set,
25889
26090
  plan
25890
- } = usePelcro();
26091
+ } = usePelcro$1();
25891
26092
  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;
25892
26093
  useEffect(() => {
25893
26094
  if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) {
@@ -27195,7 +27396,7 @@ const SavedItems = ({
27195
27396
  const [isLoading, setLoading] = useState(false);
27196
27397
  const {
27197
27398
  isAuthenticated
27198
- } = usePelcro();
27399
+ } = usePelcro$1();
27199
27400
 
27200
27401
  const removeItemFromMetadata = (category, title) => {
27201
27402
  const user = window.Pelcro.user.read();
@@ -27394,7 +27595,7 @@ const SubscriptionsItems = ({
27394
27595
  setSubscriptionToCancel,
27395
27596
  setSubscriptionToSuspend,
27396
27597
  set
27397
- } = usePelcro();
27598
+ } = usePelcro$1();
27398
27599
  const subs = getNonDonationSubs();
27399
27600
  if (subs.length === 0) return null;
27400
27601
  return subs.sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
@@ -27415,7 +27616,7 @@ const SubscriptionsItems = ({
27415
27616
  }
27416
27617
 
27417
27618
  onClose === null || onClose === void 0 ? void 0 : onClose();
27418
- notify.confirm((onSuccess, onFailure) => {
27619
+ notify$1.confirm((onSuccess, onFailure) => {
27419
27620
  cancelSubscription(sub.id, onSuccess, onFailure);
27420
27621
  }, {
27421
27622
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
@@ -27473,7 +27674,7 @@ const SubscriptionsItems = ({
27473
27674
  }
27474
27675
 
27475
27676
  onClose === null || onClose === void 0 ? void 0 : onClose();
27476
- notify.confirm((onSuccess, onFailure) => {
27677
+ notify$1.confirm((onSuccess, onFailure) => {
27477
27678
  unSuspendSubscription(sub.id, onSuccess, onFailure);
27478
27679
  }, {
27479
27680
  confirmMessage: t("messages.subUnSuspend.isSureToUnSuspend"),
@@ -27919,11 +28120,56 @@ function SvgQrcode(props) {
27919
28120
  })));
27920
28121
  }
27921
28122
 
27922
- const DonationsMenu = () => {
28123
+ const DonationsMenu = ({
28124
+ reactivateSubscription,
28125
+ disableSubmit,
28126
+ cancelSubscription
28127
+ }) => {
27923
28128
  const {
27924
28129
  t
27925
28130
  } = useTranslation("dashboard");
28131
+ const {
28132
+ switchView,
28133
+ setSubscriptionToCancel
28134
+ } = usePelcro$1();
27926
28135
  const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
28136
+ // Cancel button click handlers
28137
+ const onCancelClick = () => {
28138
+ var _onClose;
28139
+
28140
+ const isImmediateCancelationEnabled = window.Pelcro.site.read().cancel_settings.status;
28141
+
28142
+ if (isImmediateCancelationEnabled) {
28143
+ setSubscriptionToCancel(sub.id);
28144
+ return switchView("subscription-cancel");
28145
+ }
28146
+
28147
+ if (userMustVerifyEmail()) {
28148
+ return switchView("email-verify");
28149
+ }
28150
+
28151
+ (_onClose = onClose) === null || _onClose === void 0 ? void 0 : _onClose();
28152
+ notify.confirm((onSuccess, onFailure) => {
28153
+ cancelSubscription(sub.id, onSuccess, onFailure);
28154
+ }, {
28155
+ confirmMessage: t("messages.subCancellation.isSureToCancel"),
28156
+ loadingMessage: t("messages.subCancellation.loading"),
28157
+ successMessage: t("messages.subCancellation.success"),
28158
+ errorMessage: t("messages.subCancellation.error")
28159
+ }, {
28160
+ closeButtonLabel: t("labels.subCancellation.goBack")
28161
+ });
28162
+ }; // Reactivate button click handlers
28163
+
28164
+
28165
+ const onReactivateClick = () => {
28166
+ if (userMustVerifyEmail()) {
28167
+ return switchView("email-verify");
28168
+ }
28169
+
28170
+ reactivateSubscription(sub.id);
28171
+ };
28172
+
27927
28173
  return /*#__PURE__*/React__default.createElement("tr", {
27928
28174
  key: sub.id,
27929
28175
  className: "plc-w-full plc-align-top pelcro-donation-row"
@@ -27935,7 +28181,21 @@ const DonationsMenu = () => {
27935
28181
  className: "plc-text-xs plc-text-gray-400 pelcro-donation-price"
27936
28182
  }, getFormattedPriceByLocal(sub.plan.amount * sub.quantity, sub.plan.currency, getPageOrDefaultLanguage())))), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement("div", {
27937
28183
  className: "plc-mb-4 plc-text-gray-500 pelcro-donation-date"
27938
- }, sub.status && /*#__PURE__*/React__default.createElement("span", null, formatStartDate(sub.start)))));
28184
+ }, sub.status && /*#__PURE__*/React__default.createElement("span", null, formatStartDate(sub.start)))), /*#__PURE__*/React__default.createElement("td", null, sub.cancel_at_period_end === 1 && sub.plan.auto_renew && !sub.is_gift_recipient && /*#__PURE__*/React__default.createElement(Button, {
28185
+ variant: "ghost",
28186
+ className: "plc-text-green-400 focus:plc-ring-green-300 pelcro-dashboard-sub-reactivate-button",
28187
+ icon: /*#__PURE__*/React__default.createElement(SvgRefresh, null),
28188
+ onClick: onReactivateClick,
28189
+ disabled: disableSubmit,
28190
+ "data-key": sub.id
28191
+ }, t("labels.reactivate")), !sub.plan.auto_renew || sub.plan.auto_renew && sub.cancel_at_period_end === 0 ? /*#__PURE__*/React__default.createElement(Button, {
28192
+ variant: "ghost",
28193
+ className: "plc-text-red-500 focus:plc-ring-red-500 pelcro-dashboard-sub-cancel-button",
28194
+ icon: /*#__PURE__*/React__default.createElement(SvgXIconSolid, null),
28195
+ onClick: onCancelClick,
28196
+ disabled: disableSubmit,
28197
+ "data-key": sub.id
28198
+ }, t("labels.unsubscribe")) : ""));
27939
28199
  });
27940
28200
  return /*#__PURE__*/React__default.createElement("table", {
27941
28201
  className: "plc-w-full plc-table-fixed pelcro-donations-table"
@@ -27945,7 +28205,9 @@ const DonationsMenu = () => {
27945
28205
  className: "plc-w-6/12 "
27946
28206
  }, t("labels.plan")), /*#__PURE__*/React__default.createElement("th", {
27947
28207
  className: "plc-w-6/12 "
27948
- }, t("labels.startDate")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
28208
+ }, t("labels.startDate")), /*#__PURE__*/React__default.createElement("th", {
28209
+ className: "plc-w-3/12 "
28210
+ }, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
27949
28211
  className: "plc-h-4"
27950
28212
  }), subscriptions));
27951
28213
  };
@@ -27991,7 +28253,7 @@ const InvoicesItems = () => {
27991
28253
  const {
27992
28254
  setInvoice,
27993
28255
  switchView
27994
- } = usePelcro();
28256
+ } = usePelcro$1();
27995
28257
  const invoices = (_window$Pelcro$invoic = (_window$Pelcro$invoic2 = window.Pelcro.invoice.list()) === null || _window$Pelcro$invoic2 === void 0 ? void 0 : _window$Pelcro$invoic2.filter(invoice => invoice.total > 0)) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
27996
28258
 
27997
28259
  const showInvoiceDetails = event => {
@@ -28122,7 +28384,7 @@ const MembershipsItems = () => {
28122
28384
  switchView,
28123
28385
  setSelectedMembership,
28124
28386
  switchToAddressView
28125
- } = usePelcro();
28387
+ } = usePelcro$1();
28126
28388
  const memberships = getActiveMemberships();
28127
28389
 
28128
28390
  const onChangeAddressClick = membershipId => {
@@ -28202,7 +28464,7 @@ function DashboardWithHook(props) {
28202
28464
  resetView,
28203
28465
  logout,
28204
28466
  set
28205
- } = usePelcro();
28467
+ } = usePelcro$1();
28206
28468
  return /*#__PURE__*/React__default.createElement(DashboardWithTrans, {
28207
28469
  setAddress: addressIdToEdit => set({
28208
28470
  addressIdToEdit
@@ -28778,7 +29040,11 @@ class Dashboard extends Component {
28778
29040
  className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
28779
29041
  }),
28780
29042
  title: this.locale("labels.donations"),
28781
- content: /*#__PURE__*/React__default.createElement(DonationsMenu, null)
29043
+ content: /*#__PURE__*/React__default.createElement(DonationsMenu, {
29044
+ reactivateSubscription: this.reactivateSubscription,
29045
+ disableSubmit: this.state.disableSubmit,
29046
+ cancelSubscription: this.cancelSubscription
29047
+ })
28782
29048
  }), /*#__PURE__*/React__default.createElement(Accordion.item, {
28783
29049
  name: SUB_MENUS.GIFTS,
28784
29050
  icon: /*#__PURE__*/React__default.createElement(SvgGift, null),
@@ -28838,7 +29104,7 @@ const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
28838
29104
  const DashboardOpenButton = () => {
28839
29105
  const {
28840
29106
  switchView
28841
- } = usePelcro();
29107
+ } = usePelcro$1();
28842
29108
  return /*#__PURE__*/React__default.createElement("div", {
28843
29109
  className: "plc-fixed plc-right-4 plc-bottom-4 pelcro-open-dashboard-btn"
28844
29110
  }, /*#__PURE__*/React__default.createElement("button", {
@@ -30827,11 +31093,34 @@ const EmailVerifyModal = ({
30827
31093
  onClose,
30828
31094
  ...otherProps
30829
31095
  }) => {
31096
+ const {
31097
+ product,
31098
+ plan,
31099
+ switchToAddressView,
31100
+ switchToPaymentView
31101
+ } = usePelcro();
31102
+
31103
+ const onSuccess = res => {
31104
+ var _props$onSuccess, _props;
31105
+
31106
+ (_props$onSuccess = (_props = props).onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(_props, res);
31107
+
31108
+ if (product) {
31109
+ if (product.address_required) {
31110
+ return switchToAddressView();
31111
+ } else {
31112
+ return switchToPaymentView();
31113
+ }
31114
+ }
31115
+ };
31116
+
30830
31117
  return /*#__PURE__*/React__default.createElement(Modal, {
30831
31118
  onDisplay: onDisplay,
30832
31119
  onClose: onClose,
30833
31120
  id: "pelcro-email-verify-modal"
30834
- }, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(EmailVerifyView, otherProps)), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
31121
+ }, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(EmailVerifyView, Object.assign({
31122
+ onSuccess: onSuccess
31123
+ }, otherProps))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
30835
31124
  };
30836
31125
  EmailVerifyModal.viewId = "email-verify";
30837
31126
 
@@ -30979,14 +31268,14 @@ function VerifyLinkTokenModal({
30979
31268
  } = useTranslation("verifyLinkToken");
30980
31269
  const {
30981
31270
  resetView
30982
- } = usePelcro();
31271
+ } = usePelcro$1();
30983
31272
 
30984
31273
  const onSuccess = res => {
30985
31274
  var _props$onSuccess;
30986
31275
 
30987
31276
  (_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
30988
31277
  resetView();
30989
- notify.success(t("messages.success"));
31278
+ notify$1.success(t("messages.success"));
30990
31279
  };
30991
31280
 
30992
31281
  return /*#__PURE__*/React__default.createElement(Modal, {
@@ -31029,7 +31318,7 @@ const InvoicePaymentModal = ({
31029
31318
  }) => {
31030
31319
  const {
31031
31320
  switchView
31032
- } = usePelcro();
31321
+ } = usePelcro$1();
31033
31322
 
31034
31323
  const onSuccess = () => {
31035
31324
  var _otherProps$onSuccess;
@@ -31106,7 +31395,7 @@ const InvoiceDetailsDownloadButton = ({
31106
31395
  } = useTranslation("invoiceDetails");
31107
31396
  const {
31108
31397
  invoice
31109
- } = usePelcro();
31398
+ } = usePelcro$1();
31110
31399
  return /*#__PURE__*/React__default.createElement(Link, Object.assign({
31111
31400
  className: `plc-px-6 plc-py-2 plc-uppercase plc-bg-transparent plc-text-primary-500 plc-border plc-border-primary-500 plc-rounded focus:plc-outline-none focus:plc-ring-2 focus:plc-ring-primary-300 plc-tracking-wider hover:plc-bg-primary-600 focus:plc-bg-primary-600 hover:plc-text-white focus:plc-text-white hover:plc-shadow-none plc-no-underline ${className}`,
31112
31401
  id: "pelcro-download-invoice-link",
@@ -31143,7 +31432,7 @@ const InvoiceDetailsView = props => {
31143
31432
  } = useTranslation("invoiceDetails");
31144
31433
  const {
31145
31434
  invoice
31146
- } = usePelcro();
31435
+ } = usePelcro$1();
31147
31436
  const showPayButton = canPayInvoice(invoice);
31148
31437
  const showDownloadButton = Boolean(invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf);
31149
31438
  const hasPlanDetails = Boolean(invoice.plan);
@@ -31211,7 +31500,7 @@ const InvoiceDetailsModal = ({
31211
31500
  }) => {
31212
31501
  const {
31213
31502
  switchToPaymentView
31214
- } = usePelcro();
31503
+ } = usePelcro$1();
31215
31504
 
31216
31505
  const onSuccess = () => {
31217
31506
  var _otherProps$onSuccess;
@@ -32648,4 +32937,4 @@ const QrCodeModal = ({
32648
32937
  };
32649
32938
  QrCodeModal.viewId = "qrcode";
32650
32939
 
32651
- export { 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, BankAuthenticationSuccess, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, IncludeFirstName, IncludeLastName, IncludePhone, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, 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, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };
32940
+ export { 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, BankAuthenticationSuccess, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, IncludeFirstName, IncludeLastName, IncludePhone, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, 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$1 as notify, unauthenticatedButtons, usePelcro$1 as usePelcro };