@pelcro/react-pelcro-js 3.2.0-beta.9 → 3.2.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
@@ -3431,9 +3431,9 @@ var paymentMethod_fr = {
3431
3431
  select: select
3432
3432
  };
3433
3433
 
3434
- var title$h = "Enter your email to subscribe to our newsletter";
3434
+ var title$f = "Enter your email to subscribe to our newsletter";
3435
3435
  var updateTitle$1 = "Update newsletter selections";
3436
- var subtitle$9 = "We may use your email for other marketing communication";
3436
+ var subtitle$7 = "We may use your email for other marketing communication";
3437
3437
  var labels$p = {
3438
3438
  submit: "Submit",
3439
3439
  firstName: "First name",
@@ -3450,16 +3450,16 @@ var messages$r = {
3450
3450
  here: "here"
3451
3451
  };
3452
3452
  var newsletter_en = {
3453
- title: title$h,
3453
+ title: title$f,
3454
3454
  updateTitle: updateTitle$1,
3455
- subtitle: subtitle$9,
3455
+ subtitle: subtitle$7,
3456
3456
  labels: labels$p,
3457
3457
  messages: messages$r
3458
3458
  };
3459
3459
 
3460
- var title$g = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3460
+ var title$e = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3461
3461
  var updateTitle = "Mettre à jour son choix d'infolettres";
3462
- var subtitle$8 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3462
+ var subtitle$6 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3463
3463
  var labels$o = {
3464
3464
  submit: "Lire l’article !",
3465
3465
  firstName: "Prénom",
@@ -3476,9 +3476,9 @@ var messages$q = {
3476
3476
  here: "ici"
3477
3477
  };
3478
3478
  var newsletter_fr = {
3479
- title: title$g,
3479
+ title: title$e,
3480
3480
  updateTitle: updateTitle,
3481
- subtitle: subtitle$8,
3481
+ subtitle: subtitle$6,
3482
3482
  labels: labels$o,
3483
3483
  messages: messages$q
3484
3484
  };
@@ -3735,8 +3735,8 @@ var login_fr = {
3735
3735
  errors: errors$4
3736
3736
  };
3737
3737
 
3738
- var title$f = "Create an account";
3739
- var subtitle$7 = "Enter your email and password below";
3738
+ var title$d = "Create an account";
3739
+ var subtitle$5 = "Enter your email and password below";
3740
3740
  var labels$h = {
3741
3741
  signUpFacebook: "Sign up with Facebook",
3742
3742
  signUpGoogle: "Sign up with Google",
@@ -3821,8 +3821,8 @@ var redeem$1 = {
3821
3821
  }
3822
3822
  };
3823
3823
  var register_en = {
3824
- title: title$f,
3825
- subtitle: subtitle$7,
3824
+ title: title$d,
3825
+ subtitle: subtitle$5,
3826
3826
  labels: labels$h,
3827
3827
  messages: messages$h,
3828
3828
  errors: errors$3,
@@ -3830,8 +3830,8 @@ var register_en = {
3830
3830
  redeem: redeem$1
3831
3831
  };
3832
3832
 
3833
- var title$e = "Créer un compte";
3834
- var subtitle$6 = "Entrez votre courriel et votre mot de passe ci-dessous";
3833
+ var title$c = "Créer un compte";
3834
+ var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
3835
3835
  var labels$g = {
3836
3836
  signUpFacebook: "Inscrivez-vous avec Facebook",
3837
3837
  signUpGoogle: "Inscrivez-vous avec Google",
@@ -3917,8 +3917,8 @@ var redeem = {
3917
3917
  }
3918
3918
  };
3919
3919
  var register_fr = {
3920
- title: title$e,
3921
- subtitle: subtitle$6,
3920
+ title: title$c,
3921
+ subtitle: subtitle$4,
3922
3922
  labels: labels$g,
3923
3923
  messages: messages$g,
3924
3924
  errors: errors$2,
@@ -3978,7 +3978,7 @@ var userEdit_fr = {
3978
3978
  messages: messages$e
3979
3979
  };
3980
3980
 
3981
- var title$d = "Enter your shipping address";
3981
+ var title$b = "Enter your shipping address";
3982
3982
  var selectAddressTitle$1 = "Please select an address";
3983
3983
  var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
3984
3984
  var labels$d = {
@@ -4001,7 +4001,7 @@ var messages$d = {
4001
4001
  subRedeemed: "Your subscription has been redeemed."
4002
4002
  };
4003
4003
  var address_en = {
4004
- title: title$d,
4004
+ title: title$b,
4005
4005
  selectAddressTitle: selectAddressTitle$1,
4006
4006
  selectAddressSubtitle: selectAddressSubtitle$1,
4007
4007
  labels: labels$d,
@@ -4009,7 +4009,7 @@ var address_en = {
4009
4009
  messages: messages$d
4010
4010
  };
4011
4011
 
4012
- var title$c = "Entrez votre adresse de livraison";
4012
+ var title$a = "Entrez votre adresse de livraison";
4013
4013
  var selectAddressTitle = "Veuillez sélectionner une adresse";
4014
4014
  var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
4015
4015
  var labels$c = {
@@ -4032,7 +4032,7 @@ var messages$c = {
4032
4032
  subRedeemed: "Votre abonnement a bien été activé."
4033
4033
  };
4034
4034
  var address_fr = {
4035
- title: title$c,
4035
+ title: title$a,
4036
4036
  selectAddressTitle: selectAddressTitle,
4037
4037
  selectAddressSubtitle: selectAddressSubtitle,
4038
4038
  labels: labels$c,
@@ -4040,8 +4040,8 @@ var address_fr = {
4040
4040
  messages: messages$c
4041
4041
  };
4042
4042
 
4043
- var title$b = "Reset your password";
4044
- var subtitle$5 = "Enter a new password below";
4043
+ var title$9 = "Reset your password";
4044
+ var subtitle$3 = "Enter a new password below";
4045
4045
  var email$3 = "Email";
4046
4046
  var password$3 = "Password";
4047
4047
  var confirmPassword$1 = "Confirm password";
@@ -4049,8 +4049,8 @@ var submit$5 = "Submit";
4049
4049
  var required$5 = "Required";
4050
4050
  var passwordUpdated$1 = "Password has been updated, please login with the new password";
4051
4051
  var passwordReset_en = {
4052
- title: title$b,
4053
- subtitle: subtitle$5,
4052
+ title: title$9,
4053
+ subtitle: subtitle$3,
4054
4054
  email: email$3,
4055
4055
  password: password$3,
4056
4056
  confirmPassword: confirmPassword$1,
@@ -4059,8 +4059,8 @@ var passwordReset_en = {
4059
4059
  passwordUpdated: passwordUpdated$1
4060
4060
  };
4061
4061
 
4062
- var title$a = "Réinitialiser votre mot de passe";
4063
- var subtitle$4 = "Entrez un nouveau mot de passe ci-dessous";
4062
+ var title$8 = "Réinitialiser votre mot de passe";
4063
+ var subtitle$2 = "Entrez un nouveau mot de passe ci-dessous";
4064
4064
  var email$2 = "Adresse courriel";
4065
4065
  var password$2 = "Mot de passe";
4066
4066
  var confirmPassword = "Confirmer le mot de passe";
@@ -4068,8 +4068,8 @@ var submit$4 = "Soumettre";
4068
4068
  var required$4 = "Champs obligatoires";
4069
4069
  var passwordUpdated = "Votre mot de passe a été mis à jour, veuillez vous connecter avec celui-ci";
4070
4070
  var passwordReset_fr = {
4071
- title: title$a,
4072
- subtitle: subtitle$4,
4071
+ title: title$8,
4072
+ subtitle: subtitle$2,
4073
4073
  email: email$2,
4074
4074
  password: password$2,
4075
4075
  confirmPassword: confirmPassword,
@@ -4078,7 +4078,7 @@ var passwordReset_fr = {
4078
4078
  passwordUpdated: passwordUpdated
4079
4079
  };
4080
4080
 
4081
- var title$9 = "Forgot your password?";
4081
+ var title$7 = "Forgot your password?";
4082
4082
  var email$1 = "Email";
4083
4083
  var password$1 = "Password";
4084
4084
  var submit$3 = "Submit";
@@ -4089,7 +4089,7 @@ var messages$b = {
4089
4089
  loginHere: "login here."
4090
4090
  };
4091
4091
  var passwordForgot_en = {
4092
- title: title$9,
4092
+ title: title$7,
4093
4093
  email: email$1,
4094
4094
  password: password$1,
4095
4095
  submit: submit$3,
@@ -4098,7 +4098,7 @@ var passwordForgot_en = {
4098
4098
  messages: messages$b
4099
4099
  };
4100
4100
 
4101
- var title$8 = "Mot de passe oublié ?";
4101
+ var title$6 = "Mot de passe oublié ?";
4102
4102
  var email = "Courriel";
4103
4103
  var password = "Mot de passe";
4104
4104
  var submit$2 = "Soumettre";
@@ -4109,7 +4109,7 @@ var messages$a = {
4109
4109
  loginHere: "Connectez-vous ici"
4110
4110
  };
4111
4111
  var passwordForgot_fr = {
4112
- title: title$8,
4112
+ title: title$6,
4113
4113
  email: email,
4114
4114
  password: password,
4115
4115
  submit: submit$2,
@@ -4118,7 +4118,7 @@ var passwordForgot_fr = {
4118
4118
  messages: messages$a
4119
4119
  };
4120
4120
 
4121
- var title$7 = "Change your password";
4121
+ var title$5 = "Change your password";
4122
4122
  var currentPassword$1 = "Current password";
4123
4123
  var newPassword$1 = "New password";
4124
4124
  var confirmNewPassword$1 = "Confirm new password";
@@ -4128,7 +4128,7 @@ var passwordChanged$1 = "Password has been changed, please login with the new pa
4128
4128
  var passwordsNotMatching$1 = "Passwords don't match";
4129
4129
  var weakPassword$1 = "Your password must contain at least 6 characters";
4130
4130
  var passwordChange_en = {
4131
- title: title$7,
4131
+ title: title$5,
4132
4132
  currentPassword: currentPassword$1,
4133
4133
  newPassword: newPassword$1,
4134
4134
  confirmNewPassword: confirmNewPassword$1,
@@ -4139,7 +4139,7 @@ var passwordChange_en = {
4139
4139
  weakPassword: weakPassword$1
4140
4140
  };
4141
4141
 
4142
- var title$6 = "Changez votre mot de passe";
4142
+ var title$4 = "Changez votre mot de passe";
4143
4143
  var currentPassword = "Mot de passe actuel";
4144
4144
  var newPassword = "Nouveau mot de passe";
4145
4145
  var confirmNewPassword = "Confirmer le nouveau mot de passe";
@@ -4149,7 +4149,7 @@ var passwordChanged = "Le mot de passe a été modifié, veuillez vous connecter
4149
4149
  var passwordsNotMatching = "Les mots de passe ne correspondent pas";
4150
4150
  var weakPassword = "Votre mot de passe doit contenir au moins 6";
4151
4151
  var passwordChange_fr = {
4152
- title: title$6,
4152
+ title: title$4,
4153
4153
  currentPassword: currentPassword,
4154
4154
  newPassword: newPassword,
4155
4155
  confirmNewPassword: confirmNewPassword,
@@ -4160,8 +4160,8 @@ var passwordChange_fr = {
4160
4160
  weakPassword: weakPassword
4161
4161
  };
4162
4162
 
4163
- var title$5 = "Votre panier";
4164
- var subtitle$3 = "Terminez votre achat ci-dessous";
4163
+ var title$3 = "Votre panier";
4164
+ var subtitle$1 = "Terminez votre achat ci-dessous";
4165
4165
  var name$1 = "Produit";
4166
4166
  var quantity$1 = "Quantité";
4167
4167
  var price$1 = "Prix";
@@ -4172,8 +4172,8 @@ var confirm$3 = "Passer à la caisse";
4172
4172
  var empty$1 = "Votre panier est vide.";
4173
4173
  var removeAll$1 = "Vider";
4174
4174
  var cart_fr = {
4175
- title: title$5,
4176
- subtitle: subtitle$3,
4175
+ title: title$3,
4176
+ subtitle: subtitle$1,
4177
4177
  name: name$1,
4178
4178
  quantity: quantity$1,
4179
4179
  price: price$1,
@@ -4185,8 +4185,8 @@ var cart_fr = {
4185
4185
  removeAll: removeAll$1
4186
4186
  };
4187
4187
 
4188
- var title$4 = "Your shopping cart";
4189
- var subtitle$2 = "Comple your purchase below";
4188
+ var title$2 = "Your shopping cart";
4189
+ var subtitle = "Comple your purchase below";
4190
4190
  var name = "Name";
4191
4191
  var quantity = "Quantity";
4192
4192
  var price = "Price";
@@ -4197,8 +4197,8 @@ var confirm$2 = "Checkout";
4197
4197
  var empty = "Your cart is empty.";
4198
4198
  var removeAll = "Remove all";
4199
4199
  var cart_en = {
4200
- title: title$4,
4201
- subtitle: subtitle$2,
4200
+ title: title$2,
4201
+ subtitle: subtitle,
4202
4202
  name: name,
4203
4203
  quantity: quantity,
4204
4204
  price: price,
@@ -4636,7 +4636,7 @@ var verifyEmail_fr = {
4636
4636
  messages: messages
4637
4637
  };
4638
4638
 
4639
- var title$3 = "Invoice details";
4639
+ var title$1 = "Invoice details";
4640
4640
  var labels$1 = {
4641
4641
  summary: "Summary",
4642
4642
  total: "Total",
@@ -4649,12 +4649,12 @@ var buttons$1 = {
4649
4649
  pay: "Pay now"
4650
4650
  };
4651
4651
  var invoiceDetails_en = {
4652
- title: title$3,
4652
+ title: title$1,
4653
4653
  labels: labels$1,
4654
4654
  buttons: buttons$1
4655
4655
  };
4656
4656
 
4657
- var title$2 = "Détails de la facture";
4657
+ var title = "Détails de la facture";
4658
4658
  var labels = {
4659
4659
  summary: "Résumé",
4660
4660
  total: "Total",
@@ -4667,37 +4667,11 @@ var buttons = {
4667
4667
  pay: "Payer"
4668
4668
  };
4669
4669
  var invoiceDetails_fr = {
4670
- title: title$2,
4670
+ title: title,
4671
4671
  labels: labels,
4672
4672
  buttons: buttons
4673
4673
  };
4674
4674
 
4675
- var title$1 = "Renewal options";
4676
- var subtitle$1 = "Select one of the options below to continue";
4677
- var next$1 = "Next";
4678
- var addNew$1 = "Add Another Subscription";
4679
- var renew$1 = "Renew Existing Subscription";
4680
- var subscriptionOptions_en = {
4681
- title: title$1,
4682
- subtitle: subtitle$1,
4683
- next: next$1,
4684
- addNew: addNew$1,
4685
- renew: renew$1
4686
- };
4687
-
4688
- var title = "Renewal options";
4689
- var subtitle = "Select one of the options below to continue";
4690
- var next = "Next";
4691
- var addNew = "Add Another Subscription";
4692
- var renew = "Renew Existing Subscription";
4693
- var subscriptionOptions_fr = {
4694
- title: title,
4695
- subtitle: subtitle,
4696
- next: next,
4697
- addNew: addNew,
4698
- renew: renew
4699
- };
4700
-
4701
4675
  function create$1(createState) {
4702
4676
  let state;
4703
4677
  const listeners = new Set();
@@ -6047,7 +6021,7 @@ class PelcroActions {
6047
6021
  view,
6048
6022
  cartItems,
6049
6023
  ...otherStateFields
6050
- } = initialState$j;
6024
+ } = initialState$i;
6051
6025
  this.set(otherStateFields);
6052
6026
  });
6053
6027
 
@@ -6071,16 +6045,6 @@ class PelcroActions {
6071
6045
  });
6072
6046
  }
6073
6047
 
6074
- if (view === "subscription-options") {
6075
- const noRenewableProducts = getRenewableProducts().length === 0;
6076
-
6077
- if (noRenewableProducts) {
6078
- return this.set({
6079
- view: "plan-select"
6080
- });
6081
- }
6082
- }
6083
-
6084
6048
  this.set({
6085
6049
  view
6086
6050
  });
@@ -6155,26 +6119,6 @@ class PelcroActions {
6155
6119
  }
6156
6120
  });
6157
6121
 
6158
- _defineProperty$3(this, "setProductsList", products => {
6159
- if (!Array.isArray(products)) {
6160
- return console.error(`setProductsList expects an array of products as an argument, got an argument of type ${typeof products} instead`);
6161
- }
6162
-
6163
- const allowedProducts = window.Pelcro.product.list();
6164
- const validProducts = products.filter(product => {
6165
- const isValidProduct = allowedProducts.some(allowedProduct => allowedProduct.id === (product === null || product === void 0 ? void 0 : product.id) && allowedProduct.name === (product === null || product === void 0 ? void 0 : product.name));
6166
-
6167
- if (!isValidProduct) {
6168
- console.warn(`setProductsList expects an array of products that exist in the list of valid products (window.Pelcro.product.list()), but it recieved a product which doesn't exist in that list:`, product);
6169
- }
6170
-
6171
- return isValidProduct;
6172
- });
6173
- this.set({
6174
- productsList: validProducts
6175
- });
6176
- });
6177
-
6178
6122
  _defineProperty$3(this, "setProduct", id => {
6179
6123
  const product = window.Pelcro.product.getById(id);
6180
6124
  if (!product) return console.error("invalid product id");
@@ -6396,12 +6340,10 @@ class PelcroCallbacks {
6396
6340
 
6397
6341
  }
6398
6342
 
6399
- var _window$Pelcro$produc, _window$Pelcro;
6400
- const initialState$j = {
6343
+ const initialState$i = {
6401
6344
  // View
6402
6345
  view: null,
6403
6346
  // Plans
6404
- productsList: (_window$Pelcro$produc = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : _window$Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [],
6405
6347
  product: null,
6406
6348
  plan: null,
6407
6349
  isGift: false,
@@ -6428,7 +6370,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
6428
6370
  return {
6429
6371
  // Store setter
6430
6372
  set,
6431
- ...initialState$j,
6373
+ ...initialState$i,
6432
6374
  // State actions
6433
6375
  ...actions,
6434
6376
  // Callbacks
@@ -6783,30 +6725,6 @@ function userMustVerifyEmail() {
6783
6725
  const isUserEmailVerified = (_window$Pelcro$user$r9 = (_window$Pelcro$user$r10 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r10 === void 0 ? void 0 : _window$Pelcro$user$r10.email_confirm) !== null && _window$Pelcro$user$r9 !== void 0 ? _window$Pelcro$user$r9 : false;
6784
6726
  return window.Pelcro.user.isAuthenticated() && isEmailVerificationEnabled && !isUserEmailVerified;
6785
6727
  }
6786
- function getRenewableProducts() {
6787
- var _window$Pelcro$subscr, _window$Pelcro$subscr2;
6788
-
6789
- const renewableSubs = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription.list()) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : _window$Pelcro$subscr2.filter(sub => sub.status === "active" && sub.cancel_at_period_end === 1)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
6790
- const renewableProductsIds = [...new Set(renewableSubs.map(sub => sub.plan.product.id))];
6791
- const renewablePlansIds = [...new Set(renewableSubs.map(sub => sub.plan.id))];
6792
- const {
6793
- productsList
6794
- } = usePelcro.getStore();
6795
- return productsList.map(product => {
6796
- if (renewableProductsIds.includes(product.id)) {
6797
- const renewablePlans = getRenewablePlansOnly(product);
6798
- return { ...product,
6799
- plans: renewablePlans
6800
- };
6801
- }
6802
- }).filter(product => product);
6803
-
6804
- function getRenewablePlansOnly(product) {
6805
- var _product$plans$filter, _product$plans;
6806
-
6807
- return (_product$plans$filter = product === null || product === void 0 ? void 0 : (_product$plans = product.plans) === null || _product$plans === void 0 ? void 0 : _product$plans.filter(plan => renewablePlansIds.includes(plan.id))) !== null && _product$plans$filter !== void 0 ? _product$plans$filter : [];
6808
- }
6809
- }
6810
6728
 
6811
6729
  const resources = {
6812
6730
  en: {
@@ -6831,8 +6749,7 @@ const resources = {
6831
6749
  dashboard: dashboard_en,
6832
6750
  select: select_en,
6833
6751
  notification: notification_en,
6834
- invoiceDetails: invoiceDetails_en,
6835
- subscriptionOptions: subscriptionOptions_en
6752
+ invoiceDetails: invoiceDetails_en
6836
6753
  },
6837
6754
  fr: {
6838
6755
  common: common_fr,
@@ -6856,8 +6773,7 @@ const resources = {
6856
6773
  dashboard: dashboard_fr,
6857
6774
  select: select_fr,
6858
6775
  notification: notification_fr,
6859
- invoiceDetails: invoiceDetails_fr,
6860
- subscriptionOptions: subscriptionOptions_fr
6776
+ invoiceDetails: invoiceDetails_fr
6861
6777
  }
6862
6778
  }; // set UI language to the page language or default to the language in site settings
6863
6779
 
@@ -7148,8 +7064,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
7148
7064
 
7149
7065
  let e={data:""},t=t=>"undefined"!=typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e,l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(})/g,a=/\/\*[^]*?\*\/|\s\s+|\n/g,n=(e,t)=>{let r,l="",a="",o="";for(let c in e){let s=e[c];"object"==typeof s?(r=t?t.replace(/([^,])+/g,e=>c.replace(/([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):c,a+="@"==c[0]?"f"==c[1]?n(s,c):c+"{"+n(s,"k"==c[1]?"":t)+"}":n(s,r)):"@"==c[0]&&"i"==c[1]?l=c+" "+s+";":(c=c.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=n.p?n.p(c,s):c+":"+s+";");}return o[0]?(r=t?t+"{"+o+"}":o,l+r+a):l+a},o={},c=e=>{let t="";for(let r in e)t+=r+("object"==typeof e[r]?c(e[r]):e[r]);return t},s=(e,t,r,s,i)=>{let p="object"==typeof e?c(e):e,u=o[p]||(o[p]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(p));if(!o[u]){let t="object"==typeof e?e:(e=>{let t,r=[{}];for(;t=l.exec(e.replace(a,""));)t[4]&&r.shift(),t[3]?r.unshift(r[0][t[3]]=r[0][t[3]]||{}):t[4]||(r[0][t[1]]=t[2]);return r[0]})(e);o[u]=n(i?{["@keyframes "+u]:t}:t,r?"":"."+u);}return ((e,t,r)=>{-1==t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(o[u],t,s),u},i=(e,t,r)=>e.reduce((e,l,a)=>{let o=t[a];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":n(e,""):e;}return e+l+(null==o?"":o)},"");function p(e){let r=this||{},l=e.call?e(r.p):e;return s(l.unshift?l.raw?i(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>t?Object.assign(e,t.call?t(r.p):t):e,{}):l,t(r.target),r.g,r.o,r.k)}let u,f,d;p.bind({g:1});let b=p.bind({k:1});function h(e,t,r,l){n.p=t,u=e,f=r,d=l;}function y(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f&&f()},c),r.o=/ *go\d+/.test(s),c.className=p.apply(r,l)+(s?" "+s:""),t&&(c.ref=o);let i=c.as||e;return d&&i[0]&&d(c),u(i,c)}return t?t(a):a}}
7150
7066
 
7151
- function _extends$A() {
7152
- _extends$A = Object.assign || function (target) {
7067
+ function _extends$z() {
7068
+ _extends$z = Object.assign || function (target) {
7153
7069
  for (var i = 1; i < arguments.length; i++) {
7154
7070
  var source = arguments[i];
7155
7071
 
@@ -7163,7 +7079,7 @@ function _extends$A() {
7163
7079
  return target;
7164
7080
  };
7165
7081
 
7166
- return _extends$A.apply(this, arguments);
7082
+ return _extends$z.apply(this, arguments);
7167
7083
  }
7168
7084
 
7169
7085
  function _taggedTemplateLiteralLoose(strings, raw) {
@@ -7253,7 +7169,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
7253
7169
  var reducer = function reducer(state, action) {
7254
7170
  switch (action.type) {
7255
7171
  case ActionType.ADD_TOAST:
7256
- return _extends$A({}, state, {
7172
+ return _extends$z({}, state, {
7257
7173
  toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
7258
7174
  });
7259
7175
 
@@ -7263,9 +7179,9 @@ var reducer = function reducer(state, action) {
7263
7179
  clearFromRemoveQueue(action.toast.id);
7264
7180
  }
7265
7181
 
7266
- return _extends$A({}, state, {
7182
+ return _extends$z({}, state, {
7267
7183
  toasts: state.toasts.map(function (t) {
7268
- return t.id === action.toast.id ? _extends$A({}, t, action.toast) : t;
7184
+ return t.id === action.toast.id ? _extends$z({}, t, action.toast) : t;
7269
7185
  })
7270
7186
  });
7271
7187
 
@@ -7292,9 +7208,9 @@ var reducer = function reducer(state, action) {
7292
7208
  });
7293
7209
  }
7294
7210
 
7295
- return _extends$A({}, state, {
7211
+ return _extends$z({}, state, {
7296
7212
  toasts: state.toasts.map(function (t) {
7297
- return t.id === toastId || toastId === undefined ? _extends$A({}, t, {
7213
+ return t.id === toastId || toastId === undefined ? _extends$z({}, t, {
7298
7214
  visible: false
7299
7215
  }) : t;
7300
7216
  })
@@ -7302,28 +7218,28 @@ var reducer = function reducer(state, action) {
7302
7218
 
7303
7219
  case ActionType.REMOVE_TOAST:
7304
7220
  if (action.toastId === undefined) {
7305
- return _extends$A({}, state, {
7221
+ return _extends$z({}, state, {
7306
7222
  toasts: []
7307
7223
  });
7308
7224
  }
7309
7225
 
7310
- return _extends$A({}, state, {
7226
+ return _extends$z({}, state, {
7311
7227
  toasts: state.toasts.filter(function (t) {
7312
7228
  return t.id !== action.toastId;
7313
7229
  })
7314
7230
  });
7315
7231
 
7316
7232
  case ActionType.START_PAUSE:
7317
- return _extends$A({}, state, {
7233
+ return _extends$z({}, state, {
7318
7234
  pausedAt: action.time
7319
7235
  });
7320
7236
 
7321
7237
  case ActionType.END_PAUSE:
7322
7238
  var diff = action.time - (state.pausedAt || 0);
7323
- return _extends$A({}, state, {
7239
+ return _extends$z({}, state, {
7324
7240
  pausedAt: undefined,
7325
7241
  toasts: state.toasts.map(function (t) {
7326
- return _extends$A({}, t, {
7242
+ return _extends$z({}, t, {
7327
7243
  pauseDuration: t.pauseDuration + diff
7328
7244
  });
7329
7245
  })
@@ -7370,12 +7286,12 @@ var useStore = function useStore(toastOptions) {
7370
7286
  var mergedToasts = state.toasts.map(function (t) {
7371
7287
  var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
7372
7288
 
7373
- return _extends$A({}, toastOptions, toastOptions[t.type], t, {
7289
+ return _extends$z({}, toastOptions, toastOptions[t.type], t, {
7374
7290
  duration: t.duration || ((_toastOptions$t$type = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type.duration) || ((_toastOptions = toastOptions) == null ? void 0 : _toastOptions.duration) || defaultTimeouts[t.type],
7375
- style: _extends$A({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7291
+ style: _extends$z({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7376
7292
  });
7377
7293
  });
7378
- return _extends$A({}, state, {
7294
+ return _extends$z({}, state, {
7379
7295
  toasts: mergedToasts
7380
7296
  });
7381
7297
  };
@@ -7385,7 +7301,7 @@ var createToast = function createToast(message, type, opts) {
7385
7301
  type = 'blank';
7386
7302
  }
7387
7303
 
7388
- return _extends$A({
7304
+ return _extends$z({
7389
7305
  createdAt: Date.now(),
7390
7306
  visible: true,
7391
7307
  type: type,
@@ -7435,14 +7351,14 @@ toast.remove = function (toastId) {
7435
7351
  };
7436
7352
 
7437
7353
  toast.promise = function (promise, msgs, opts) {
7438
- var id = toast.loading(msgs.loading, _extends$A({}, opts, opts == null ? void 0 : opts.loading));
7354
+ var id = toast.loading(msgs.loading, _extends$z({}, opts, opts == null ? void 0 : opts.loading));
7439
7355
  promise.then(function (p) {
7440
- toast.success(resolveValue(msgs.success, p), _extends$A({
7356
+ toast.success(resolveValue(msgs.success, p), _extends$z({
7441
7357
  id: id
7442
7358
  }, opts, opts == null ? void 0 : opts.success));
7443
7359
  return p;
7444
7360
  })["catch"](function (e) {
7445
- toast.error(resolveValue(msgs.error, e), _extends$A({
7361
+ toast.error(resolveValue(msgs.error, e), _extends$z({
7446
7362
  id: id
7447
7363
  }, opts, opts == null ? void 0 : opts.error));
7448
7364
  });
@@ -7781,7 +7697,7 @@ var ToastBar = /*#__PURE__*/memo(function (_ref2) {
7781
7697
  var message = createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
7782
7698
  return createElement(ToastBarBase, {
7783
7699
  className: toast.className,
7784
- style: _extends$A({}, animationStyle, style, toast.style)
7700
+ style: _extends$z({}, animationStyle, style, toast.style)
7785
7701
  }, typeof children === 'function' ? children({
7786
7702
  icon: icon,
7787
7703
  message: message
@@ -7811,7 +7727,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
7811
7727
  } : position.includes('right') ? {
7812
7728
  justifyContent: 'flex-end'
7813
7729
  } : {};
7814
- return _extends$A({
7730
+ return _extends$z({
7815
7731
  left: 0,
7816
7732
  right: 0,
7817
7733
  display: 'flex',
@@ -7838,7 +7754,7 @@ var Toaster = function Toaster(_ref) {
7838
7754
  handlers = _useToaster.handlers;
7839
7755
 
7840
7756
  return createElement("div", {
7841
- style: _extends$A({
7757
+ style: _extends$z({
7842
7758
  position: 'fixed',
7843
7759
  zIndex: 9999,
7844
7760
  top: DEFAULT_OFFSET,
@@ -7873,82 +7789,82 @@ var Toaster = function Toaster(_ref) {
7873
7789
  }));
7874
7790
  };
7875
7791
 
7876
- var _path$x;
7792
+ var _path$w;
7877
7793
 
7878
- function _extends$z() { _extends$z = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$z.apply(this, arguments); }
7794
+ function _extends$y() { _extends$y = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$y.apply(this, arguments); }
7879
7795
 
7880
7796
  function SvgCheckSolid(props) {
7881
- return /*#__PURE__*/React.createElement("svg", _extends$z({
7797
+ return /*#__PURE__*/React.createElement("svg", _extends$y({
7882
7798
  xmlns: "http://www.w3.org/2000/svg",
7883
7799
  className: "h-5 w-5",
7884
7800
  viewBox: "0 0 20 20",
7885
7801
  fill: "currentColor"
7886
- }, props), _path$x || (_path$x = /*#__PURE__*/React.createElement("path", {
7802
+ }, props), _path$w || (_path$w = /*#__PURE__*/React.createElement("path", {
7887
7803
  fillRule: "evenodd",
7888
7804
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
7889
7805
  clipRule: "evenodd"
7890
7806
  })));
7891
7807
  }
7892
7808
 
7893
- var _path$w;
7809
+ var _path$v;
7894
7810
 
7895
- function _extends$y() { _extends$y = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$y.apply(this, arguments); }
7811
+ function _extends$x() { _extends$x = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$x.apply(this, arguments); }
7896
7812
 
7897
7813
  function SvgXIcon(props) {
7898
- return /*#__PURE__*/React.createElement("svg", _extends$y({
7814
+ return /*#__PURE__*/React.createElement("svg", _extends$x({
7899
7815
  xmlns: "http://www.w3.org/2000/svg",
7900
7816
  viewBox: "0 0 20 20",
7901
7817
  fill: "currentColor"
7902
- }, props), _path$w || (_path$w = /*#__PURE__*/React.createElement("path", {
7818
+ }, props), _path$v || (_path$v = /*#__PURE__*/React.createElement("path", {
7903
7819
  fill: "evenodd",
7904
7820
  d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
7905
7821
  clipRule: "evenodd"
7906
7822
  })));
7907
7823
  }
7908
7824
 
7909
- var _path$v;
7825
+ var _path$u;
7910
7826
 
7911
- function _extends$x() { _extends$x = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$x.apply(this, arguments); }
7827
+ function _extends$w() { _extends$w = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
7912
7828
 
7913
7829
  function SvgXIconSolid(props) {
7914
- return /*#__PURE__*/React.createElement("svg", _extends$x({
7830
+ return /*#__PURE__*/React.createElement("svg", _extends$w({
7915
7831
  className: "plc-w-4 plc-h-4",
7916
7832
  fill: "currentColor",
7917
7833
  xmlns: "http://www.w3.org/2000/svg",
7918
7834
  viewBox: "0 0 100 100"
7919
- }, props), _path$v || (_path$v = /*#__PURE__*/React.createElement("path", {
7835
+ }, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
7920
7836
  d: "M94.842 48.408c0 24.852-20.148 44.999-45.002 44.999-24.851 0-44.997-20.146-44.997-44.999 0-24.854 20.146-45 44.997-45 24.853 0 45.002 20.146 45.002 45zM71.073 64.841L54.73 48.497l16.344-16.344-4.979-4.979-16.343 16.345-16.343-16.344-4.799 4.799 16.344 16.344L28.61 64.661l4.979 4.978 16.344-16.344 16.343 16.344 4.797-4.798z"
7921
7837
  })));
7922
7838
  }
7923
7839
 
7924
- var _path$u;
7840
+ var _path$t;
7925
7841
 
7926
- function _extends$w() { _extends$w = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
7842
+ function _extends$v() { _extends$v = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
7927
7843
 
7928
7844
  function SvgExclamation(props) {
7929
- return /*#__PURE__*/React.createElement("svg", _extends$w({
7845
+ return /*#__PURE__*/React.createElement("svg", _extends$v({
7930
7846
  className: "plc-w-4 plc-h-4 plc-mr-1",
7931
7847
  xmlns: "http://www.w3.org/2000/svg",
7932
7848
  viewBox: "0 0 20 20",
7933
7849
  fill: "currentColor"
7934
- }, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
7850
+ }, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
7935
7851
  fillRule: "evenodd",
7936
7852
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",
7937
7853
  clipRule: "evenodd"
7938
7854
  })));
7939
7855
  }
7940
7856
 
7941
- var _path$t, _path2$4;
7857
+ var _path$s, _path2$4;
7942
7858
 
7943
- function _extends$v() { _extends$v = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
7859
+ function _extends$u() { _extends$u = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
7944
7860
 
7945
7861
  function SvgSpinner(props) {
7946
- return /*#__PURE__*/React.createElement("svg", _extends$v({
7862
+ return /*#__PURE__*/React.createElement("svg", _extends$u({
7947
7863
  className: "plc-animate-spin",
7948
7864
  viewBox: "0 0 24 24",
7949
7865
  fill: "currentColor",
7950
7866
  xmlns: "http://www.w3.org/2000/svg"
7951
- }, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
7867
+ }, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
7952
7868
  opacity: 0.2,
7953
7869
  fill: "evenodd",
7954
7870
  clipRule: "evenodd",
@@ -8238,9 +8154,7 @@ const init$1 = () => {
8238
8154
  return switchToAddressView();
8239
8155
  });
8240
8156
  } else {
8241
- pelcroSubscribeButtonsByClass[j].addEventListener("click", () => {
8242
- return switchView("subscription-options");
8243
- });
8157
+ pelcroSubscribeButtonsByClass[j].addEventListener("click", () => switchView("plan-select"));
8244
8158
  }
8245
8159
  }
8246
8160
  }
@@ -8402,8 +8316,7 @@ function Link({
8402
8316
  const init = () => {
8403
8317
  const {
8404
8318
  switchView,
8405
- set,
8406
- setProductsList
8319
+ set
8407
8320
  } = usePelcro.getStore();
8408
8321
  const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
8409
8322
 
@@ -8454,8 +8367,7 @@ const init = () => {
8454
8367
  }
8455
8368
 
8456
8369
  notify.dismiss(NOTIFICATION_ID);
8457
- setProductsList(window.Pelcro.product.getByEntitlements(entitlements));
8458
- switchView("plan-select");
8370
+ switchView("_plan-select-entitlements");
8459
8371
  }
8460
8372
  }, "Subscribe"), "now to get full page access.")), {
8461
8373
  className: "pelcro-notification-entitlement",
@@ -8707,6 +8619,10 @@ const getErrorMessages = error => {
8707
8619
  return error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.error) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2.message;
8708
8620
  }
8709
8621
 
8622
+ if (error !== null && error !== void 0 && error.message) {
8623
+ return error.message;
8624
+ }
8625
+
8710
8626
  const errorMessages = []; // enumerable error (ex: validation errors)
8711
8627
 
8712
8628
  Object.values(error === null || error === void 0 ? void 0 : (_error$response5 = error.response) === null || _error$response5 === void 0 ? void 0 : (_error$response5$data = _error$response5.data) === null || _error$response5$data === void 0 ? void 0 : _error$response5$data.errors).forEach(([errorMessage]) => {
@@ -9286,7 +9202,7 @@ const PelcroModalController = ({
9286
9202
  type
9287
9203
  }) => (type === null || type === void 0 ? void 0 : type.viewId) === "dashboard-open"), React__default.Children.map(children, child => child).find(({
9288
9204
  type
9289
- }) => (type === null || type === void 0 ? void 0 : type.viewId) === "notification"), view === "_plan-select-renew" && React__default.Children.map(children, child => child).find(({
9205
+ }) => (type === null || type === void 0 ? void 0 : type.viewId) === "notification"), view === "_plan-select-entitlements" && React__default.Children.map(children, child => child).find(({
9290
9206
  type
9291
9207
  }) => (type === null || type === void 0 ? void 0 : type.viewId) === "plan-select"), React__default.Children.map(children, child => child).find(({
9292
9208
  type
@@ -9567,10 +9483,8 @@ const LOAD_PAYMENT_METHODS = "LOAD_PAYMENT_METHODS";
9567
9483
  const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
9568
9484
  const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
9569
9485
  const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
9570
- const SWITCH_TO_RENEW = "SWITCH_TO_RENEW";
9571
- const SWITCH_TO_NEW = "SWITCH_TO_NEW";
9572
9486
 
9573
- const initialState$i = {
9487
+ const initialState$h = {
9574
9488
  email: "",
9575
9489
  password: "",
9576
9490
  emailError: null,
@@ -9581,10 +9495,10 @@ const initialState$i = {
9581
9495
  content: ""
9582
9496
  }
9583
9497
  };
9584
- const store$i = /*#__PURE__*/createContext(initialState$i);
9498
+ const store$h = /*#__PURE__*/createContext(initialState$h);
9585
9499
  const {
9586
- Provider: Provider$i
9587
- } = store$i;
9500
+ Provider: Provider$h
9501
+ } = store$h;
9588
9502
 
9589
9503
  const LoginContainer = ({
9590
9504
  style,
@@ -9691,7 +9605,7 @@ const LoginContainer = ({
9691
9605
  });
9692
9606
 
9693
9607
  case RESET_LOGIN_FORM:
9694
- return initialState$i;
9608
+ return initialState$h;
9695
9609
 
9696
9610
  case DISABLE_LOGIN_BUTTON:
9697
9611
  return lib_7({ ...state,
@@ -9709,12 +9623,12 @@ const LoginContainer = ({
9709
9623
  default:
9710
9624
  return state;
9711
9625
  }
9712
- }, initialState$i);
9626
+ }, initialState$h);
9713
9627
  return /*#__PURE__*/React__default.createElement("div", {
9714
9628
  style: { ...style
9715
9629
  },
9716
9630
  className: `pelcro-container pelcro-login-container ${className}`
9717
- }, /*#__PURE__*/React__default.createElement(Provider$i, {
9631
+ }, /*#__PURE__*/React__default.createElement(Provider$h, {
9718
9632
  value: {
9719
9633
  state,
9720
9634
  dispatch
@@ -9722,12 +9636,12 @@ const LoginContainer = ({
9722
9636
  }, children.length ? children.map((child, i) => {
9723
9637
  if (child) {
9724
9638
  return /*#__PURE__*/React__default.cloneElement(child, {
9725
- store: store$i,
9639
+ store: store$h,
9726
9640
  key: i
9727
9641
  });
9728
9642
  }
9729
9643
  }) : /*#__PURE__*/React__default.cloneElement(children, {
9730
- store: store$i
9644
+ store: store$h
9731
9645
  })));
9732
9646
  };
9733
9647
 
@@ -9972,7 +9886,7 @@ const LoginButton = ({
9972
9886
  buttonDisabled
9973
9887
  },
9974
9888
  dispatch
9975
- } = useContext(store$i);
9889
+ } = useContext(store$h);
9976
9890
  const {
9977
9891
  t
9978
9892
  } = useTranslation("login");
@@ -9993,23 +9907,23 @@ const LoginButton = ({
9993
9907
  };
9994
9908
 
9995
9909
  const LoginEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
9996
- store: store$i
9910
+ store: store$h
9997
9911
  }, props));
9998
9912
 
9999
9913
  const LoginPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
10000
- store: store$i
9914
+ store: store$h
10001
9915
  }, props));
10002
9916
 
10003
- var _path$s;
9917
+ var _path$r;
10004
9918
 
10005
- function _extends$u() { _extends$u = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
9919
+ function _extends$t() { _extends$t = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
10006
9920
 
10007
9921
  function SvgCheck(props) {
10008
- return /*#__PURE__*/React.createElement("svg", _extends$u({
9922
+ return /*#__PURE__*/React.createElement("svg", _extends$t({
10009
9923
  xmlns: "http://www.w3.org/2000/svg",
10010
9924
  fill: "currentColor",
10011
9925
  viewBox: "0 0 20 20"
10012
- }, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
9926
+ }, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
10013
9927
  fillRule: "evenodd",
10014
9928
  d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
10015
9929
  clipRule: "evenodd"
@@ -10074,7 +9988,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
10074
9988
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
10075
9989
  facebookLoginRenderProps.FacebookLogin;
10076
9990
 
10077
- const initialState$h = {
9991
+ const initialState$g = {
10078
9992
  email: "",
10079
9993
  password: "",
10080
9994
  emailError: null,
@@ -10091,10 +10005,10 @@ const initialState$h = {
10091
10005
  content: ""
10092
10006
  }
10093
10007
  };
10094
- const store$h = /*#__PURE__*/createContext(initialState$h);
10008
+ const store$g = /*#__PURE__*/createContext(initialState$g);
10095
10009
  const {
10096
- Provider: Provider$h
10097
- } = store$h;
10010
+ Provider: Provider$g
10011
+ } = store$g;
10098
10012
 
10099
10013
  const RegisterContainer = ({
10100
10014
  style,
@@ -10277,7 +10191,7 @@ const RegisterContainer = ({
10277
10191
  });
10278
10192
 
10279
10193
  case RESET_LOGIN_FORM:
10280
- return initialState$h;
10194
+ return initialState$g;
10281
10195
 
10282
10196
  case DISABLE_REGISTRATION_BUTTON:
10283
10197
  return lib_7({ ...state,
@@ -10295,12 +10209,12 @@ const RegisterContainer = ({
10295
10209
  default:
10296
10210
  return state;
10297
10211
  }
10298
- }, initialState$h);
10212
+ }, initialState$g);
10299
10213
  return /*#__PURE__*/React__default.createElement("div", {
10300
10214
  style: { ...style
10301
10215
  },
10302
10216
  className: `pelcro-container pelcro-register-container ${className}`
10303
- }, /*#__PURE__*/React__default.createElement(Provider$h, {
10217
+ }, /*#__PURE__*/React__default.createElement(Provider$g, {
10304
10218
  value: {
10305
10219
  state,
10306
10220
  dispatch
@@ -10308,12 +10222,12 @@ const RegisterContainer = ({
10308
10222
  }, children.length ? children.map((child, i) => {
10309
10223
  if (child) {
10310
10224
  return /*#__PURE__*/React__default.cloneElement(child, {
10311
- store: store$h,
10225
+ store: store$g,
10312
10226
  key: i
10313
10227
  });
10314
10228
  }
10315
10229
  }) : /*#__PURE__*/React__default.cloneElement(children, {
10316
- store: store$h
10230
+ store: store$g
10317
10231
  })));
10318
10232
  };
10319
10233
  /**
@@ -10328,15 +10242,15 @@ function hasSecurityTokenEnabled$1() {
10328
10242
  return hasSecuritySdkLoaded;
10329
10243
  }
10330
10244
 
10331
- var _path$r;
10245
+ var _path$q;
10332
10246
 
10333
- function _extends$t() { _extends$t = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
10247
+ function _extends$s() { _extends$s = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
10334
10248
 
10335
10249
  function SvgFacebookLogo(props) {
10336
- return /*#__PURE__*/React.createElement("svg", _extends$t({
10250
+ return /*#__PURE__*/React.createElement("svg", _extends$s({
10337
10251
  xmlns: "http://www.w3.org/2000/svg",
10338
10252
  viewBox: "88.428 12.828 107.543 207.085"
10339
- }, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
10253
+ }, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
10340
10254
  d: "M158.232 219.912v-94.461h31.707l4.747-36.813h-36.454V65.134c0-10.658 2.96-17.922 18.245-17.922l19.494-.009V14.278c-3.373-.447-14.944-1.449-28.406-1.449-28.106 0-47.348 17.155-47.348 48.661v27.149H88.428v36.813h31.788v94.461l38.016-.001z",
10341
10255
  fill: "#3c5a9a"
10342
10256
  })));
@@ -10353,10 +10267,10 @@ const FacebookLoginButton = ({
10353
10267
  const facebookLoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id;
10354
10268
  const {
10355
10269
  dispatch: loginDispatch
10356
- } = useContext(store$i);
10270
+ } = useContext(store$h);
10357
10271
  const {
10358
10272
  dispatch: registerDispatch
10359
- } = useContext(store$h);
10273
+ } = useContext(store$g);
10360
10274
 
10361
10275
  const onSuccess = facebookUser => {
10362
10276
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
@@ -10409,15 +10323,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
10409
10323
  unwrapExports(googleLogin);
10410
10324
  var googleLogin_1 = googleLogin.GoogleLogin;
10411
10325
 
10412
- var _path$q, _path2$3, _path3$1, _path4;
10326
+ var _path$p, _path2$3, _path3$1, _path4;
10413
10327
 
10414
- function _extends$s() { _extends$s = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
10328
+ function _extends$r() { _extends$r = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
10415
10329
 
10416
10330
  function SvgGoogleLogo(props) {
10417
- return /*#__PURE__*/React.createElement("svg", _extends$s({
10331
+ return /*#__PURE__*/React.createElement("svg", _extends$r({
10418
10332
  viewBox: "0 0 24 24",
10419
10333
  xmlns: "http://www.w3.org/2000/svg"
10420
- }, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
10334
+ }, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
10421
10335
  fill: "#4285F4",
10422
10336
  d: "M23.745 12.27c0-.79-.07-1.54-.19-2.27h-11.3v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"
10423
10337
  })), _path2$3 || (_path2$3 = /*#__PURE__*/React.createElement("path", {
@@ -10443,10 +10357,10 @@ const GoogleLoginButton = ({
10443
10357
  const googleLoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.google_app_id;
10444
10358
  const {
10445
10359
  dispatch: loginDispatch
10446
- } = useContext(store$i);
10360
+ } = useContext(store$h);
10447
10361
  const {
10448
10362
  dispatch: registerDispatch
10449
- } = useContext(store$h);
10363
+ } = useContext(store$g);
10450
10364
 
10451
10365
  const onSuccess = response => {
10452
10366
  var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
@@ -10494,15 +10408,15 @@ const GoogleLoginButton = ({
10494
10408
  }) : null;
10495
10409
  };
10496
10410
 
10497
- var _path$p;
10411
+ var _path$o;
10498
10412
 
10499
- function _extends$r() { _extends$r = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
10413
+ function _extends$q() { _extends$q = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
10500
10414
 
10501
10415
  function SvgAuth0Logo(props) {
10502
- return /*#__PURE__*/React.createElement("svg", _extends$r({
10416
+ return /*#__PURE__*/React.createElement("svg", _extends$q({
10503
10417
  viewBox: "0 0 256 285",
10504
10418
  xmlns: "http://www.w3.org/2000/svg"
10505
- }, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
10419
+ }, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
10506
10420
  d: "M220.412 0h-92.415l28.562 89.006h92.416l-74.77 53.077 28.57 89.511c48.128-35.06 63.854-88.12 46.208-142.588L220.413 0zM7.018 89.006h92.416L127.997 0H35.589L7.019 89.006c-17.655 54.468-1.92 107.529 46.207 142.588l28.563-89.51-74.77-53.078zm46.208 142.588l74.77 52.97 74.77-52.97-74.77-53.847-74.77 53.847z"
10507
10421
  })));
10508
10422
  }
@@ -10542,10 +10456,10 @@ const Auth0LoginButton = ({
10542
10456
  }, [auth0Enabled, auth0Loaded]);
10543
10457
  const {
10544
10458
  dispatch: loginDispatch
10545
- } = useContext(store$i);
10459
+ } = useContext(store$h);
10546
10460
  const {
10547
10461
  dispatch: registerDispatch
10548
- } = useContext(store$h);
10462
+ } = useContext(store$g);
10549
10463
 
10550
10464
  function handleClick() {
10551
10465
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
@@ -10678,15 +10592,15 @@ function LoginView(props) {
10678
10592
  }, /*#__PURE__*/React__default.createElement(GoogleLoginButton, null), /*#__PURE__*/React__default.createElement(FacebookLoginButton, null), /*#__PURE__*/React__default.createElement(Auth0LoginButton, null))))));
10679
10593
  }
10680
10594
 
10681
- var _path$o, _path2$2, _path3;
10595
+ var _path$n, _path2$2, _path3;
10682
10596
 
10683
- function _extends$q() { _extends$q = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
10597
+ function _extends$p() { _extends$p = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
10684
10598
 
10685
10599
  function SvgPelcroAuthorship(props) {
10686
- return /*#__PURE__*/React.createElement("svg", _extends$q({
10600
+ return /*#__PURE__*/React.createElement("svg", _extends$p({
10687
10601
  xmlns: "http://www.w3.org/2000/svg",
10688
10602
  viewBox: "0 -80.652 497.072 179.991"
10689
- }, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
10603
+ }, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
10690
10604
  fill: "none",
10691
10605
  stroke: "#4a4a4a",
10692
10606
  d: "M487.89 42.299c0 13.158-10.671 23.829-23.829 23.829H37.074c-13.162 0-23.832-10.671-23.832-23.829v-63.552c0-13.158 10.67-23.831 23.832-23.831H464.06c13.158 0 23.829 10.672 23.829 23.831l.001 63.552z"
@@ -10833,11 +10747,11 @@ function LoginModal({
10833
10747
  LoginModal.viewId = "login";
10834
10748
 
10835
10749
  const RegisterEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
10836
- store: store$h
10750
+ store: store$g
10837
10751
  }, props));
10838
10752
 
10839
10753
  const RegisterPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
10840
- store: store$h
10754
+ store: store$g
10841
10755
  }, props));
10842
10756
 
10843
10757
  const RegisterButton = ({
@@ -10857,7 +10771,7 @@ const RegisterButton = ({
10857
10771
  buttonDisabled
10858
10772
  },
10859
10773
  dispatch
10860
- } = useContext(store$h);
10774
+ } = useContext(store$g);
10861
10775
  const {
10862
10776
  t
10863
10777
  } = useTranslation("register");
@@ -10995,7 +10909,7 @@ function FirstName({
10995
10909
  }
10996
10910
 
10997
10911
  const RegisterFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
10998
- store: store$h
10912
+ store: store$g
10999
10913
  }, props));
11000
10914
 
11001
10915
  function LastName({
@@ -11026,7 +10940,7 @@ function LastName({
11026
10940
  }
11027
10941
 
11028
10942
  const RegisterLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
11029
- store: store$h
10943
+ store: store$g
11030
10944
  }, props));
11031
10945
 
11032
10946
  /**
@@ -11150,7 +11064,7 @@ function TextInput({
11150
11064
 
11151
11065
  const RegisterTextInput = props => {
11152
11066
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
11153
- store: store$h
11067
+ store: store$g
11154
11068
  }));
11155
11069
  };
11156
11070
 
@@ -11297,7 +11211,6 @@ function SelectModalWithHook(props) {
11297
11211
  (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
11298
11212
  }, []);
11299
11213
  const {
11300
- productsList,
11301
11214
  isGift,
11302
11215
  plan,
11303
11216
  product,
@@ -11307,12 +11220,11 @@ function SelectModalWithHook(props) {
11307
11220
  view,
11308
11221
  set
11309
11222
  } = usePelcro();
11310
- const isRenewingSub = view === "_plan-select-renew";
11223
+ const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
11224
+ const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
11311
11225
  return /*#__PURE__*/React__default.createElement(SelectModalWithTrans, {
11312
- productsList: productsList,
11313
11226
  isGift: isGift,
11314
- disableGifting: isRenewingGift || isRenewingSub,
11315
- isRenewingSub: isRenewingSub,
11227
+ disableGifting: isRenewingGift,
11316
11228
  plan: plan,
11317
11229
  product: product,
11318
11230
  onClose: () => {
@@ -11326,10 +11238,8 @@ function SelectModalWithHook(props) {
11326
11238
  plan,
11327
11239
  isGift
11328
11240
  }),
11329
- setSubscriptionIdToRenew: subscriptionIdToRenew => set({
11330
- subscriptionIdToRenew
11331
- }),
11332
- setView: switchView
11241
+ setView: switchView,
11242
+ matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
11333
11243
  });
11334
11244
  }
11335
11245
  SelectModalWithHook.viewId = "plan-select";
@@ -11361,10 +11271,10 @@ class SelectModal extends Component {
11361
11271
  });
11362
11272
  }
11363
11273
 
11364
- if (this.props.productsList.length === 1) {
11274
+ if (this.state.productList.length === 1) {
11365
11275
  this.setState({
11366
- product: this.props.productsList[0],
11367
- planList: this.props.productsList[0].plans,
11276
+ product: this.state.productList[0],
11277
+ planList: this.state.productList[0].plans,
11368
11278
  mode: "plan"
11369
11279
  });
11370
11280
  }
@@ -11381,7 +11291,7 @@ class SelectModal extends Component {
11381
11291
  });
11382
11292
 
11383
11293
  _defineProperty$3(this, "onProductChange", e => {
11384
- const product = productsList[e.target.selectedIndex];
11294
+ const product = window.Pelcro.product.list()[e.target.selectedIndex];
11385
11295
  this.setState({
11386
11296
  product: product,
11387
11297
  plan: product.plans[0]
@@ -11447,7 +11357,7 @@ class SelectModal extends Component {
11447
11357
 
11448
11358
  _defineProperty$3(this, "renderProducts", () => {
11449
11359
  const userDidSelectProduct = Boolean(this.state.mode === "plan");
11450
- const productsToShow = userDidSelectProduct ? [this.state.product] : this.props.productsList;
11360
+ const productsToShow = userDidSelectProduct ? [this.state.product] : this.state.productList;
11451
11361
  return productsToShow.map((product, index) => {
11452
11362
  return this.renderOneProduct(product, index);
11453
11363
  });
@@ -11460,7 +11370,7 @@ class SelectModal extends Component {
11460
11370
  return this.renderOneProduct(this.state.product);
11461
11371
  }
11462
11372
 
11463
- const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(this.props.productsList); // Render normal products if there are no available matching products
11373
+ const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(); // Render normal products if there are no available matching products
11464
11374
 
11465
11375
  if (!(productsThatMatchArticleTag !== null && productsThatMatchArticleTag !== void 0 && productsThatMatchArticleTag.length)) {
11466
11376
  return this.renderProducts();
@@ -11476,7 +11386,10 @@ class SelectModal extends Component {
11476
11386
  className: "plc-text-sm plc-font-semibold"
11477
11387
  }, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
11478
11388
 
11479
- function productsWithMatchedTaggedFirst(allProducts) {
11389
+ function productsWithMatchedTaggedFirst() {
11390
+ var _window$Pelcro$produc;
11391
+
11392
+ const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
11480
11393
  const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
11481
11394
  const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
11482
11395
  return [productsThatMatchArticleTag, allProductsMinusMatched];
@@ -11510,7 +11423,7 @@ class SelectModal extends Component {
11510
11423
  _defineProperty$3(this, "selectProduct", e => {
11511
11424
  const id = e.target.dataset.key;
11512
11425
 
11513
- for (const product of this.props.productsList) {
11426
+ for (const product of this.state.productList) {
11514
11427
  if (+product.id === +id) {
11515
11428
  var _this$state$plan;
11516
11429
 
@@ -11563,14 +11476,6 @@ class SelectModal extends Component {
11563
11476
 
11564
11477
  _defineProperty$3(this, "submitOption", () => {
11565
11478
  this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift);
11566
-
11567
- if (this.props.isRenewingSub) {
11568
- var _matchingSub$id;
11569
-
11570
- const matchingSub = window.Pelcro.subscription.list().find(sub => sub.plan.id === this.state.plan.id && sub.status === "active" && sub.cancel_at_period_end === 1);
11571
- this.props.setSubscriptionIdToRenew((_matchingSub$id = matchingSub === null || matchingSub === void 0 ? void 0 : matchingSub.id) !== null && _matchingSub$id !== void 0 ? _matchingSub$id : null);
11572
- }
11573
-
11574
11479
  const {
11575
11480
  product,
11576
11481
  isGift
@@ -11608,7 +11513,8 @@ class SelectModal extends Component {
11608
11513
  plan: {},
11609
11514
  isGift: props.isGift,
11610
11515
  disabled: true,
11611
- mode: "product"
11516
+ mode: "product",
11517
+ productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
11612
11518
  };
11613
11519
  this.product = this.props.product || window.Pelcro.paywall.getProduct();
11614
11520
  this.locale = this.props.t;
@@ -11616,7 +11522,7 @@ class SelectModal extends Component {
11616
11522
  }
11617
11523
 
11618
11524
  render() {
11619
- var _this$props$productsL, _this$props$productsL2, _window$Pelcro$site$r;
11525
+ var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
11620
11526
 
11621
11527
  const {
11622
11528
  disableGifting
@@ -11650,7 +11556,7 @@ class SelectModal extends Component {
11650
11556
  className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
11651
11557
  }, /*#__PURE__*/React__default.createElement("h4", {
11652
11558
  className: "plc-text-2xl plc-font-semibold"
11653
- }, this.product && this.product.paywall.select_title || ((_this$props$productsL = this.props.productsList[0]) === null || _this$props$productsL === void 0 ? void 0 : _this$props$productsL.paywall.select_title)), /*#__PURE__*/React__default.createElement("p", null, this.product && this.product.paywall.select_subtitle || ((_this$props$productsL2 = this.props.productsList[0]) === null || _this$props$productsL2 === void 0 ? void 0 : _this$props$productsL2.paywall.select_subtitle))), /*#__PURE__*/React__default.createElement("div", {
11559
+ }, this.product && this.product.paywall.select_title || ((_window$Pelcro$produc2 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc2 === void 0 ? void 0 : _window$Pelcro$produc2.paywall.select_title)), /*#__PURE__*/React__default.createElement("p", null, this.product && this.product.paywall.select_subtitle || ((_window$Pelcro$produc3 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc3 === void 0 ? void 0 : _window$Pelcro$produc3.paywall.select_subtitle))), /*#__PURE__*/React__default.createElement("div", {
11654
11560
  className: "pelcro-select-products-wrapper"
11655
11561
  }, (_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", {
11656
11562
  className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
@@ -13502,7 +13408,7 @@ class VantivGateway {
13502
13408
 
13503
13409
  /** @type {PaymentStateType} */
13504
13410
 
13505
- const initialState$g = {
13411
+ const initialState$f = {
13506
13412
  disableSubmit: false,
13507
13413
  isLoading: false,
13508
13414
  disableCouponButton: false,
@@ -13521,10 +13427,10 @@ const initialState$g = {
13521
13427
  content: ""
13522
13428
  }
13523
13429
  };
13524
- const store$g = /*#__PURE__*/createContext(initialState$g);
13430
+ const store$f = /*#__PURE__*/createContext(initialState$f);
13525
13431
  const {
13526
- Provider: Provider$g
13527
- } = store$g;
13432
+ Provider: Provider$f
13433
+ } = store$f;
13528
13434
 
13529
13435
  const PaymentMethodContainerWithoutStripe = ({
13530
13436
  style,
@@ -14776,21 +14682,21 @@ const PaymentMethodContainerWithoutStripe = ({
14776
14682
  default:
14777
14683
  return state;
14778
14684
  }
14779
- }, initialState$g);
14685
+ }, initialState$f);
14780
14686
  return /*#__PURE__*/React__default.createElement("div", {
14781
14687
  style: { ...style
14782
14688
  },
14783
14689
  className: `pelcro-container pelcro-payment-container ${className}`
14784
- }, /*#__PURE__*/React__default.createElement(Provider$g, {
14690
+ }, /*#__PURE__*/React__default.createElement(Provider$f, {
14785
14691
  value: {
14786
14692
  state,
14787
14693
  dispatch
14788
14694
  }
14789
14695
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
14790
- store: store$g,
14696
+ store: store$f,
14791
14697
  key: i
14792
14698
  })) : /*#__PURE__*/React__default.cloneElement(children, {
14793
- store: store$g
14699
+ store: store$f
14794
14700
  })));
14795
14701
  };
14796
14702
 
@@ -14812,7 +14718,7 @@ const PaymentMethodContainer = props => {
14812
14718
  stripeAccount: window.Pelcro.site.read().account_id,
14813
14719
  locale: getPageOrDefaultLanguage()
14814
14720
  }, /*#__PURE__*/React__default.createElement(es_11, null, /*#__PURE__*/React__default.createElement(UnwrappedForm, Object.assign({
14815
- store: store$g
14721
+ store: store$f
14816
14722
  }, props))));
14817
14723
  }
14818
14724
 
@@ -14865,7 +14771,7 @@ const PelcroPaymentRequestButton = props => {
14865
14771
  currentPlan,
14866
14772
  updatedPrice
14867
14773
  }
14868
- } = useContext(store$g);
14774
+ } = useContext(store$f);
14869
14775
 
14870
14776
  const updatePaymentRequest = () => {
14871
14777
  // Make sure payment request is up to date, eg. user added a coupon code.
@@ -14941,7 +14847,7 @@ const DiscountedPrice = props => {
14941
14847
  taxAmount,
14942
14848
  percentOff
14943
14849
  }
14944
- } = useContext(store$g);
14850
+ } = useContext(store$f);
14945
14851
  const {
14946
14852
  order,
14947
14853
  plan
@@ -14991,7 +14897,7 @@ const SubmitPaymentMethod = ({
14991
14897
  isLoading,
14992
14898
  updatedPrice
14993
14899
  }
14994
- } = useContext(store$g);
14900
+ } = useContext(store$f);
14995
14901
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
14996
14902
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
14997
14903
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -15012,17 +14918,17 @@ const SubmitPaymentMethod = ({
15012
14918
  }, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
15013
14919
  };
15014
14920
 
15015
- var _path$n;
14921
+ var _path$m;
15016
14922
 
15017
- function _extends$p() { _extends$p = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
14923
+ function _extends$o() { _extends$o = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
15018
14924
 
15019
14925
  function SvgArrowLeft(props) {
15020
- return /*#__PURE__*/React.createElement("svg", _extends$p({
14926
+ return /*#__PURE__*/React.createElement("svg", _extends$o({
15021
14927
  xmlns: "http://www.w3.org/2000/svg",
15022
14928
  fill: "none",
15023
14929
  viewBox: "0 0 24 24",
15024
14930
  stroke: "currentColor"
15025
- }, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
14931
+ }, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
15026
14932
  strokeLinecap: "round",
15027
14933
  strokeLinejoin: "round",
15028
14934
  strokeWidth: 2,
@@ -15041,7 +14947,7 @@ const ApplyCouponButton = ({
15041
14947
  disableCouponButton
15042
14948
  },
15043
14949
  dispatch
15044
- } = useContext(store$g);
14950
+ } = useContext(store$f);
15045
14951
  const {
15046
14952
  t
15047
14953
  } = useTranslation("checkoutForm");
@@ -15075,7 +14981,7 @@ const CouponCodeField = props => {
15075
14981
  couponCode,
15076
14982
  couponError
15077
14983
  }
15078
- } = useContext(store$g);
14984
+ } = useContext(store$f);
15079
14985
 
15080
14986
  const onCouponCodeChange = e => {
15081
14987
  dispatch({
@@ -15104,17 +15010,17 @@ const CouponCodeField = props => {
15104
15010
  }, props));
15105
15011
  };
15106
15012
 
15107
- var _path$m;
15013
+ var _path$l;
15108
15014
 
15109
- function _extends$o() { _extends$o = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
15015
+ function _extends$n() { _extends$n = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
15110
15016
 
15111
15017
  function SvgTicket(props) {
15112
- return /*#__PURE__*/React.createElement("svg", _extends$o({
15018
+ return /*#__PURE__*/React.createElement("svg", _extends$n({
15113
15019
  xmlns: "http://www.w3.org/2000/svg",
15114
15020
  fill: "none",
15115
15021
  viewBox: "0 0 24 24",
15116
15022
  stroke: "currentColor"
15117
- }, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
15023
+ }, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
15118
15024
  strokeLinecap: "round",
15119
15025
  strokeLinejoin: "round",
15120
15026
  strokeWidth: 2,
@@ -15131,7 +15037,7 @@ const CouponCode = ({
15131
15037
  state: {
15132
15038
  enableCouponField
15133
15039
  }
15134
- } = useContext(store$g);
15040
+ } = useContext(store$f);
15135
15041
  const {
15136
15042
  t
15137
15043
  } = useTranslation("checkoutForm");
@@ -15388,7 +15294,7 @@ const PaypalSubscribeButton = props => {
15388
15294
  const {
15389
15295
  dispatch,
15390
15296
  state
15391
- } = useContext(store$g);
15297
+ } = useContext(store$f);
15392
15298
  const {
15393
15299
  product,
15394
15300
  plan,
@@ -15403,7 +15309,7 @@ const PaypalSubscribeButton = props => {
15403
15309
  const selectedAddress = getAddressById((_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : selectedAddressId); // initialize paypal client, then render paypal button.
15404
15310
 
15405
15311
  const initializePaypal = async () => {
15406
- var _props$buttonElementI, _props$product$addres, _props$product, _props$plan2;
15312
+ var _props$buttonElementI, _props$product$addres, _props$product;
15407
15313
 
15408
15314
  const paypalCheckoutInstance = new PaypalClient({
15409
15315
  buttonElementID: (_props$buttonElementI = props.buttonElementID) !== null && _props$buttonElementI !== void 0 ? _props$buttonElementI : "pelcro-paypal-button",
@@ -15413,12 +15319,33 @@ const PaypalSubscribeButton = props => {
15413
15319
  displayName: props.merchantDisplayName,
15414
15320
  locale: props.locale,
15415
15321
  billingAgreementDescription: props.billingDescription
15416
- }); // Await building paypal instance
15322
+ });
15323
+
15324
+ const getProduct = () => {
15325
+ if (invoice) {
15326
+ invoice.plan = null;
15327
+
15328
+ if (invoice.plan) {
15329
+ return invoice.plan;
15330
+ } else {
15331
+ // standalone invoices dont have a plan
15332
+ return {
15333
+ currency: invoice.currency,
15334
+ nickname: `invoice #${invoice.id}`
15335
+ };
15336
+ }
15337
+ } else if (props.plan) {
15338
+ return props.plan;
15339
+ } else {
15340
+ return plan;
15341
+ }
15342
+ }; // Await building paypal instance
15343
+
15417
15344
 
15418
15345
  await paypalCheckoutInstance.build(); // Create paypal payment
15419
15346
 
15420
15347
  paypalCheckoutInstance.createPayment({
15421
- product: invoice ? invoice.plan : (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
15348
+ product: getProduct(),
15422
15349
  amount: updatedPrice,
15423
15350
  address: invoice ? null : selectedAddress,
15424
15351
  onButtonClick: () => {
@@ -15474,16 +15401,16 @@ const BankRedirection = () => {
15474
15401
  }));
15475
15402
  };
15476
15403
 
15477
- var _path$l;
15404
+ var _path$k;
15478
15405
 
15479
- function _extends$n() { _extends$n = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
15406
+ function _extends$m() { _extends$m = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
15480
15407
 
15481
15408
  function SvgLock(props) {
15482
- return /*#__PURE__*/React.createElement("svg", _extends$n({
15409
+ return /*#__PURE__*/React.createElement("svg", _extends$m({
15483
15410
  xmlns: "http://www.w3.org/2000/svg",
15484
15411
  viewBox: "0 0 20 20",
15485
15412
  fill: "currentColor"
15486
- }, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
15413
+ }, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
15487
15414
  fillRule: "evenodd",
15488
15415
  d: "M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",
15489
15416
  clipRule: "evenodd"
@@ -15500,7 +15427,7 @@ const SelectedPaymentMethod = () => {
15500
15427
  state: {
15501
15428
  isLoading
15502
15429
  }
15503
- } = useContext(store$g);
15430
+ } = useContext(store$f);
15504
15431
  const {
15505
15432
  switchView,
15506
15433
  selectedPaymentMethodId
@@ -15542,7 +15469,7 @@ const TaxAmount = () => {
15542
15469
  state: {
15543
15470
  taxAmount
15544
15471
  }
15545
- } = useContext(store$g);
15472
+ } = useContext(store$f);
15546
15473
  const {
15547
15474
  plan
15548
15475
  } = usePelcro();
@@ -15706,12 +15633,12 @@ function SubscriptionRenewModal({
15706
15633
  }
15707
15634
  SubscriptionRenewModal.viewId = "subscription-renew";
15708
15635
 
15709
- var _path$k;
15636
+ var _path$j;
15710
15637
 
15711
- function _extends$m() { _extends$m = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
15638
+ function _extends$l() { _extends$l = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
15712
15639
 
15713
15640
  function SvgGift(props) {
15714
- return /*#__PURE__*/React.createElement("svg", _extends$m({
15641
+ return /*#__PURE__*/React.createElement("svg", _extends$l({
15715
15642
  className: "plc-w-6 plc-h-6 plc-mr-2",
15716
15643
  fill: "none",
15717
15644
  stroke: "currentColor",
@@ -15720,7 +15647,7 @@ function SvgGift(props) {
15720
15647
  strokeWidth: 2,
15721
15648
  viewBox: "0 0 24 24",
15722
15649
  xmlns: "http://www.w3.org/2000/svg"
15723
- }, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
15650
+ }, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
15724
15651
  d: "M20 12v10H4V12M2 7h20v5H2zM12 22V7M12 7H7.5a2.5 2.5 0 010-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z"
15725
15652
  })));
15726
15653
  }
@@ -16061,7 +15988,7 @@ class DefaultNewsLetter extends Component {
16061
15988
 
16062
15989
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
16063
15990
 
16064
- const initialState$f = {
15991
+ const initialState$e = {
16065
15992
  didSubToNewslettersBefore: false,
16066
15993
  newsletters: [],
16067
15994
  isListLoading: true,
@@ -16071,10 +15998,10 @@ const initialState$f = {
16071
15998
  content: ""
16072
15999
  }
16073
16000
  };
16074
- const store$f = /*#__PURE__*/createContext(initialState$f);
16001
+ const store$e = /*#__PURE__*/createContext(initialState$e);
16075
16002
  const {
16076
- Provider: Provider$f
16077
- } = store$f;
16003
+ Provider: Provider$e
16004
+ } = store$e;
16078
16005
 
16079
16006
  const NewsletterUpdateContainer = ({
16080
16007
  style,
@@ -16187,7 +16114,7 @@ const NewsletterUpdateContainer = ({
16187
16114
  default:
16188
16115
  return state;
16189
16116
  }
16190
- }, initialState$f);
16117
+ }, initialState$e);
16191
16118
  useEffect(() => {
16192
16119
  const getUserNewsletters = () => {
16193
16120
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -16231,7 +16158,7 @@ const NewsletterUpdateContainer = ({
16231
16158
  style: { ...style
16232
16159
  },
16233
16160
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
16234
- }, /*#__PURE__*/React__default.createElement(Provider$f, {
16161
+ }, /*#__PURE__*/React__default.createElement(Provider$e, {
16235
16162
  value: {
16236
16163
  state,
16237
16164
  dispatch
@@ -16239,12 +16166,12 @@ const NewsletterUpdateContainer = ({
16239
16166
  }, children.length ? children.map((child, i) => {
16240
16167
  if (child) {
16241
16168
  return /*#__PURE__*/React__default.cloneElement(child, {
16242
- store: store$f,
16169
+ store: store$e,
16243
16170
  key: i
16244
16171
  });
16245
16172
  }
16246
16173
  }) : /*#__PURE__*/React__default.cloneElement(children, {
16247
- store: store$f
16174
+ store: store$e
16248
16175
  })));
16249
16176
  };
16250
16177
 
@@ -16259,7 +16186,7 @@ const NewsletterUpdateButton = ({
16259
16186
  isSubmitting,
16260
16187
  isListLoading
16261
16188
  }
16262
- } = useContext(store$f);
16189
+ } = useContext(store$e);
16263
16190
  const {
16264
16191
  t
16265
16192
  } = useTranslation("newsletter");
@@ -16289,7 +16216,7 @@ const NewsletterUpdateList = () => {
16289
16216
  newsletters,
16290
16217
  isListLoading
16291
16218
  }
16292
- } = useContext(store$f);
16219
+ } = useContext(store$e);
16293
16220
 
16294
16221
  if (isListLoading) {
16295
16222
  return /*#__PURE__*/React__default.createElement(Loader, {
@@ -16493,7 +16420,7 @@ function SubscriptionCreateModal({
16493
16420
  SubscriptionCreateModal.viewId = "subscription-create";
16494
16421
 
16495
16422
  var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
16496
- const initialState$e = {
16423
+ const initialState$d = {
16497
16424
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
16498
16425
  firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
16499
16426
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
@@ -16506,10 +16433,10 @@ const initialState$e = {
16506
16433
  content: ""
16507
16434
  }
16508
16435
  };
16509
- const store$e = /*#__PURE__*/createContext(initialState$e);
16436
+ const store$d = /*#__PURE__*/createContext(initialState$d);
16510
16437
  const {
16511
- Provider: Provider$e
16512
- } = store$e;
16438
+ Provider: Provider$d
16439
+ } = store$d;
16513
16440
 
16514
16441
  const UserUpdateContainer = ({
16515
16442
  style,
@@ -16641,27 +16568,27 @@ const UserUpdateContainer = ({
16641
16568
  default:
16642
16569
  return state;
16643
16570
  }
16644
- }, initialState$e);
16571
+ }, initialState$d);
16645
16572
  return /*#__PURE__*/React__default.createElement("div", {
16646
16573
  style: { ...style
16647
16574
  },
16648
16575
  className: `pelcro-container pelcro-user-update-container ${className}`
16649
- }, /*#__PURE__*/React__default.createElement(Provider$e, {
16576
+ }, /*#__PURE__*/React__default.createElement(Provider$d, {
16650
16577
  value: {
16651
16578
  state,
16652
16579
  dispatch
16653
16580
  }
16654
16581
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
16655
- store: store$e,
16582
+ store: store$d,
16656
16583
  key: i
16657
16584
  })) : /*#__PURE__*/React__default.cloneElement(children, {
16658
- store: store$e
16585
+ store: store$d
16659
16586
  })));
16660
16587
  };
16661
16588
 
16662
16589
  const UserUpdateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
16663
16590
  disabled: true,
16664
- store: store$e
16591
+ store: store$d
16665
16592
  }, props));
16666
16593
 
16667
16594
  const UserUpdateButton = ({
@@ -16674,7 +16601,7 @@ const UserUpdateButton = ({
16674
16601
  buttonDisabled
16675
16602
  },
16676
16603
  dispatch
16677
- } = useContext(store$e);
16604
+ } = useContext(store$d);
16678
16605
  const {
16679
16606
  t
16680
16607
  } = useTranslation("userEdit");
@@ -16691,11 +16618,11 @@ const UserUpdateButton = ({
16691
16618
  };
16692
16619
 
16693
16620
  const UserUpdateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
16694
- store: store$e
16621
+ store: store$d
16695
16622
  }, props));
16696
16623
 
16697
16624
  const UserUpdateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
16698
- store: store$e
16625
+ store: store$d
16699
16626
  }, props));
16700
16627
 
16701
16628
  function Phone({
@@ -16724,22 +16651,22 @@ function Phone({
16724
16651
  }
16725
16652
 
16726
16653
  const UserUpdatePhone = props => /*#__PURE__*/React__default.createElement(Phone, Object.assign({
16727
- store: store$e
16654
+ store: store$d
16728
16655
  }, props));
16729
16656
 
16730
16657
  var userSolidIcon = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22plc-h-5%20plc-w-5%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22white%22%3E%20%20%3Cpath%20transform%3D%22translate%280%2C2%29%22%20fill-rule%3D%22evenodd%22%20d%3D%22M10%209a3%203%200%20100-6%203%203%200%20000%206zm-7%209a7%207%200%201114%200H3z%22%20clip-rule%3D%22evenodd%22%20%2F%3E%3C%2Fsvg%3E";
16731
16658
 
16732
- var _path$j;
16659
+ var _path$i;
16733
16660
 
16734
- function _extends$l() { _extends$l = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
16661
+ function _extends$k() { _extends$k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
16735
16662
 
16736
16663
  function SvgEdit(props) {
16737
- return /*#__PURE__*/React.createElement("svg", _extends$l({
16664
+ return /*#__PURE__*/React.createElement("svg", _extends$k({
16738
16665
  className: "plc-w-6 plc-h-6",
16739
16666
  xmlns: "http://www.w3.org/2000/svg",
16740
16667
  viewBox: "0 0 20 20",
16741
16668
  fill: "currentColor"
16742
- }, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
16669
+ }, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
16743
16670
  d: "M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zm-2.207 2.207L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"
16744
16671
  })));
16745
16672
  }
@@ -16871,16 +16798,16 @@ function DisplayName({
16871
16798
  }
16872
16799
 
16873
16800
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
16874
- store: store$e
16801
+ store: store$d
16875
16802
  }, props));
16876
16803
 
16877
16804
  const UserUpdateTextInput = props => {
16878
16805
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
16879
- store: store$e
16806
+ store: store$d
16880
16807
  }));
16881
16808
  };
16882
16809
 
16883
- const initialState$d = {
16810
+ const initialState$c = {
16884
16811
  isSubmitting: false,
16885
16812
  firstName: "",
16886
16813
  firstNameError: "",
@@ -16905,10 +16832,10 @@ const initialState$d = {
16905
16832
  content: ""
16906
16833
  }
16907
16834
  };
16908
- const store$d = /*#__PURE__*/createContext(initialState$d);
16835
+ const store$c = /*#__PURE__*/createContext(initialState$c);
16909
16836
  const {
16910
- Provider: Provider$d
16911
- } = store$d;
16837
+ Provider: Provider$c
16838
+ } = store$c;
16912
16839
 
16913
16840
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
16914
16841
 
@@ -17115,7 +17042,7 @@ const AddressCreateContainer = ({
17115
17042
  default:
17116
17043
  return state;
17117
17044
  }
17118
- }, initialState$d);
17045
+ }, initialState$c);
17119
17046
  useEffect(() => {
17120
17047
  const getStates = () => {
17121
17048
  dispatch({
@@ -17147,16 +17074,16 @@ const AddressCreateContainer = ({
17147
17074
  style: { ...style
17148
17075
  },
17149
17076
  className: `pelcro-container pelcro-address-create-container ${className}`
17150
- }, /*#__PURE__*/React__default.createElement(Provider$d, {
17077
+ }, /*#__PURE__*/React__default.createElement(Provider$c, {
17151
17078
  value: {
17152
17079
  state,
17153
17080
  dispatch
17154
17081
  }
17155
17082
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
17156
- store: store$d,
17083
+ store: store$c,
17157
17084
  key: i
17158
17085
  })) : /*#__PURE__*/React__default.cloneElement(children, {
17159
- store: store$d
17086
+ store: store$c
17160
17087
  })));
17161
17088
  };
17162
17089
 
@@ -17167,7 +17094,7 @@ function AddressCreateFirstName(props) {
17167
17094
  firstName,
17168
17095
  firstNameError
17169
17096
  }
17170
- } = useContext(store$d);
17097
+ } = useContext(store$c);
17171
17098
 
17172
17099
  const handleBlur = () => {
17173
17100
  return dispatch({
@@ -17210,7 +17137,7 @@ function AddressCreateLastName(props) {
17210
17137
  lastName,
17211
17138
  lastNameError
17212
17139
  }
17213
- } = useContext(store$d);
17140
+ } = useContext(store$c);
17214
17141
 
17215
17142
  const handleBlur = () => {
17216
17143
  return dispatch({
@@ -17253,7 +17180,7 @@ function AddressCreateLine1(props) {
17253
17180
  line1,
17254
17181
  line1Error
17255
17182
  }
17256
- } = useContext(store$d);
17183
+ } = useContext(store$c);
17257
17184
 
17258
17185
  const handleBlur = () => {
17259
17186
  return dispatch({
@@ -17296,7 +17223,7 @@ function AddressCreateCity(props) {
17296
17223
  city,
17297
17224
  cityError
17298
17225
  }
17299
- } = useContext(store$d);
17226
+ } = useContext(store$c);
17300
17227
 
17301
17228
  const handleBlur = () => {
17302
17229
  return dispatch({
@@ -17339,7 +17266,7 @@ function AddressCreatePostalCode(props) {
17339
17266
  postalCode,
17340
17267
  postalCodeError
17341
17268
  }
17342
- } = useContext(store$d);
17269
+ } = useContext(store$c);
17343
17270
 
17344
17271
  const handleBlur = () => {
17345
17272
  return dispatch({
@@ -17385,7 +17312,7 @@ const AddressCreateSubmit = ({
17385
17312
  state: {
17386
17313
  isSubmitting
17387
17314
  }
17388
- } = useContext(store$d);
17315
+ } = useContext(store$c);
17389
17316
  const {
17390
17317
  t
17391
17318
  } = useTranslation("address");
@@ -17496,7 +17423,7 @@ function CountrySelect({
17496
17423
  }
17497
17424
 
17498
17425
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
17499
- store: store$d
17426
+ store: store$c
17500
17427
  }, props));
17501
17428
 
17502
17429
  function StateSelect({
@@ -17584,7 +17511,7 @@ function StateSelect({
17584
17511
  }
17585
17512
 
17586
17513
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
17587
- store: store$d
17514
+ store: store$c
17588
17515
  }, props));
17589
17516
 
17590
17517
  const AddressCreateView = props => {
@@ -17689,18 +17616,18 @@ AddressCreateModal.viewId = "address-create";
17689
17616
 
17690
17617
  const AddressCreateTextInput = props => {
17691
17618
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
17692
- store: store$d
17619
+ store: store$c
17693
17620
  }));
17694
17621
  };
17695
17622
 
17696
17623
  const AddressCreateLine2 = props => {
17697
17624
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
17698
17625
  fieldName: "line2",
17699
- store: store$d
17626
+ store: store$c
17700
17627
  }, props));
17701
17628
  };
17702
17629
 
17703
- const initialState$c = {
17630
+ const initialState$b = {
17704
17631
  isSubmitting: false,
17705
17632
  firstName: "",
17706
17633
  firstNameError: "",
@@ -17725,10 +17652,10 @@ const initialState$c = {
17725
17652
  content: ""
17726
17653
  }
17727
17654
  };
17728
- const store$c = /*#__PURE__*/createContext(initialState$c);
17655
+ const store$b = /*#__PURE__*/createContext(initialState$b);
17729
17656
  const {
17730
- Provider: Provider$c
17731
- } = store$c;
17657
+ Provider: Provider$b
17658
+ } = store$b;
17732
17659
 
17733
17660
  const AddressUpdateContainer = ({
17734
17661
  style,
@@ -17780,7 +17707,7 @@ const AddressUpdateContainer = ({
17780
17707
  const thisAddress = addresses[address];
17781
17708
 
17782
17709
  if (+thisAddress.id === +addressId) {
17783
- const newState = { ...initialState$c,
17710
+ const newState = { ...initialState$b,
17784
17711
  firstName: thisAddress.first_name,
17785
17712
  lastName: thisAddress.last_name,
17786
17713
  line1: thisAddress.line1,
@@ -17913,7 +17840,7 @@ const AddressUpdateContainer = ({
17913
17840
  default:
17914
17841
  return state;
17915
17842
  }
17916
- }, initialState$c);
17843
+ }, initialState$b);
17917
17844
  useEffect(() => {
17918
17845
  const getStates = () => {
17919
17846
  dispatch({
@@ -17945,21 +17872,21 @@ const AddressUpdateContainer = ({
17945
17872
  style: { ...style
17946
17873
  },
17947
17874
  className: `pelcro-container pelcro-address-update-container ${className}`
17948
- }, /*#__PURE__*/React__default.createElement(Provider$c, {
17875
+ }, /*#__PURE__*/React__default.createElement(Provider$b, {
17949
17876
  value: {
17950
17877
  state,
17951
17878
  dispatch
17952
17879
  }
17953
17880
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
17954
- store: store$c,
17881
+ store: store$b,
17955
17882
  key: i
17956
17883
  })) : /*#__PURE__*/React__default.cloneElement(children, {
17957
- store: store$c
17884
+ store: store$b
17958
17885
  })));
17959
17886
  };
17960
17887
 
17961
17888
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
17962
- store: store$c
17889
+ store: store$b
17963
17890
  }, props));
17964
17891
 
17965
17892
  function AddressUpdateFirstName(props) {
@@ -17969,7 +17896,7 @@ function AddressUpdateFirstName(props) {
17969
17896
  firstName,
17970
17897
  firstNameError
17971
17898
  }
17972
- } = useContext(store$c);
17899
+ } = useContext(store$b);
17973
17900
 
17974
17901
  const handleBlur = () => {
17975
17902
  return dispatch({
@@ -18012,7 +17939,7 @@ function AddressUpdateLastName(props) {
18012
17939
  lastName,
18013
17940
  lastNameError
18014
17941
  }
18015
- } = useContext(store$c);
17942
+ } = useContext(store$b);
18016
17943
 
18017
17944
  const handleBlur = () => {
18018
17945
  return dispatch({
@@ -18055,7 +17982,7 @@ function AddressUpdateLine1(props) {
18055
17982
  line1,
18056
17983
  line1Error
18057
17984
  }
18058
- } = useContext(store$c);
17985
+ } = useContext(store$b);
18059
17986
 
18060
17987
  const handleBlur = () => {
18061
17988
  return dispatch({
@@ -18095,7 +18022,7 @@ const AddressUpdateLine2 = props => {
18095
18022
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
18096
18023
  fieldName: "line2"
18097
18024
  }, props, {
18098
- store: store$c
18025
+ store: store$b
18099
18026
  }));
18100
18027
  };
18101
18028
 
@@ -18106,7 +18033,7 @@ function AddressUpdateCity(props) {
18106
18033
  city,
18107
18034
  cityError
18108
18035
  }
18109
- } = useContext(store$c);
18036
+ } = useContext(store$b);
18110
18037
 
18111
18038
  const handleBlur = () => {
18112
18039
  return dispatch({
@@ -18149,7 +18076,7 @@ function AddressUpdatePostalCode(props) {
18149
18076
  postalCode,
18150
18077
  postalCodeError
18151
18078
  }
18152
- } = useContext(store$c);
18079
+ } = useContext(store$b);
18153
18080
 
18154
18081
  const handleBlur = () => {
18155
18082
  return dispatch({
@@ -18195,7 +18122,7 @@ const AddressUpdateSubmit = ({
18195
18122
  state: {
18196
18123
  isSubmitting
18197
18124
  }
18198
- } = useContext(store$c);
18125
+ } = useContext(store$b);
18199
18126
  const {
18200
18127
  t
18201
18128
  } = useTranslation("address");
@@ -18211,7 +18138,7 @@ const AddressUpdateSubmit = ({
18211
18138
  };
18212
18139
 
18213
18140
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
18214
- store: store$c
18141
+ store: store$b
18215
18142
  }, props));
18216
18143
 
18217
18144
  const AddressUpdateView = props => {
@@ -18294,7 +18221,7 @@ AddressUpdateModal.viewId = "address-edit";
18294
18221
 
18295
18222
  const AddressUpdateTextInput = props => {
18296
18223
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
18297
- store: store$c
18224
+ store: store$b
18298
18225
  }));
18299
18226
  };
18300
18227
 
@@ -18377,7 +18304,7 @@ const PaymentMethodUpdateModal = props => {
18377
18304
  };
18378
18305
  PaymentMethodUpdateModal.viewId = "payment-method-update";
18379
18306
 
18380
- const initialState$b = {
18307
+ const initialState$a = {
18381
18308
  email: "",
18382
18309
  password: "",
18383
18310
  passwordError: null,
@@ -18390,10 +18317,10 @@ const initialState$b = {
18390
18317
  content: ""
18391
18318
  }
18392
18319
  };
18393
- const store$b = /*#__PURE__*/createContext(initialState$b);
18320
+ const store$a = /*#__PURE__*/createContext(initialState$a);
18394
18321
  const {
18395
- Provider: Provider$b
18396
- } = store$b;
18322
+ Provider: Provider$a
18323
+ } = store$a;
18397
18324
 
18398
18325
  const PasswordResetContainer = ({
18399
18326
  style,
@@ -18450,7 +18377,7 @@ const PasswordResetContainer = ({
18450
18377
  type: SET_EMAIL,
18451
18378
  payload: window.Pelcro.helpers.getURLParameter("email")
18452
18379
  });
18453
- initialState$b.email = window.Pelcro.helpers.getURLParameter("email");
18380
+ initialState$a.email = window.Pelcro.helpers.getURLParameter("email");
18454
18381
  dispatch({
18455
18382
  type: SET_TOKEN,
18456
18383
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -18510,26 +18437,26 @@ const PasswordResetContainer = ({
18510
18437
  default:
18511
18438
  return state;
18512
18439
  }
18513
- }, initialState$b);
18440
+ }, initialState$a);
18514
18441
  return /*#__PURE__*/React__default.createElement("div", {
18515
18442
  style: { ...style
18516
18443
  },
18517
18444
  className: `pelcro-container pelcro-password-reset-container ${className}`
18518
- }, /*#__PURE__*/React__default.createElement(Provider$b, {
18445
+ }, /*#__PURE__*/React__default.createElement(Provider$a, {
18519
18446
  value: {
18520
18447
  state,
18521
18448
  dispatch
18522
18449
  }
18523
18450
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18524
- store: store$b,
18451
+ store: store$a,
18525
18452
  key: i
18526
18453
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18527
- store: store$b
18454
+ store: store$a
18528
18455
  })));
18529
18456
  };
18530
18457
 
18531
18458
  const PasswordResetPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
18532
- store: store$b
18459
+ store: store$a
18533
18460
  }, props));
18534
18461
 
18535
18462
  const PasswordResetButton = ({
@@ -18542,7 +18469,7 @@ const PasswordResetButton = ({
18542
18469
  buttonDisabled
18543
18470
  },
18544
18471
  dispatch
18545
- } = useContext(store$b);
18472
+ } = useContext(store$a);
18546
18473
  const {
18547
18474
  t
18548
18475
  } = useTranslation("passwordReset");
@@ -18559,14 +18486,14 @@ const PasswordResetButton = ({
18559
18486
  };
18560
18487
 
18561
18488
  const PasswordResetEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
18562
- store: store$b
18489
+ store: store$a
18563
18490
  }, props, {
18564
18491
  value: window.Pelcro.helpers.getURLParameter("email"),
18565
18492
  disabled: true
18566
18493
  }));
18567
18494
 
18568
18495
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default.createElement(ConfirmPassword, Object.assign({
18569
- store: store$b
18496
+ store: store$a
18570
18497
  }, props));
18571
18498
 
18572
18499
  const PasswordResetView = props => {
@@ -18618,7 +18545,7 @@ const PasswordResetModal = ({
18618
18545
  };
18619
18546
  PasswordResetModal.viewId = "password-reset";
18620
18547
 
18621
- const initialState$a = {
18548
+ const initialState$9 = {
18622
18549
  email: "",
18623
18550
  emailError: null,
18624
18551
  buttonDisabled: false,
@@ -18627,10 +18554,10 @@ const initialState$a = {
18627
18554
  content: ""
18628
18555
  }
18629
18556
  };
18630
- const store$a = /*#__PURE__*/createContext(initialState$a);
18557
+ const store$9 = /*#__PURE__*/createContext(initialState$9);
18631
18558
  const {
18632
- Provider: Provider$a
18633
- } = store$a;
18559
+ Provider: Provider$9
18560
+ } = store$9;
18634
18561
 
18635
18562
  const PasswordForgotContainer = ({
18636
18563
  style,
@@ -18708,21 +18635,21 @@ const PasswordForgotContainer = ({
18708
18635
  default:
18709
18636
  return state;
18710
18637
  }
18711
- }, initialState$a);
18638
+ }, initialState$9);
18712
18639
  return /*#__PURE__*/React__default.createElement("div", {
18713
18640
  style: { ...style
18714
18641
  },
18715
18642
  className: `pelcro-container pelcro-password-forgot-container ${className}`
18716
- }, /*#__PURE__*/React__default.createElement(Provider$a, {
18643
+ }, /*#__PURE__*/React__default.createElement(Provider$9, {
18717
18644
  value: {
18718
18645
  state,
18719
18646
  dispatch
18720
18647
  }
18721
18648
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18722
- store: store$a,
18649
+ store: store$9,
18723
18650
  key: i
18724
18651
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18725
- store: store$a
18652
+ store: store$9
18726
18653
  })));
18727
18654
  };
18728
18655
 
@@ -18738,7 +18665,7 @@ const PasswordForgotButton = ({
18738
18665
  emailError
18739
18666
  },
18740
18667
  dispatch
18741
- } = useContext(store$a);
18668
+ } = useContext(store$9);
18742
18669
  const {
18743
18670
  t
18744
18671
  } = useTranslation("passwordForgot");
@@ -18759,7 +18686,7 @@ const PasswordForgotButton = ({
18759
18686
  };
18760
18687
 
18761
18688
  const PasswordForgotEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
18762
- store: store$a
18689
+ store: store$9
18763
18690
  }, props));
18764
18691
 
18765
18692
  const PasswordForgotView = props => {
@@ -18809,7 +18736,7 @@ const PasswordForgotModal = ({
18809
18736
  };
18810
18737
  PasswordForgotModal.viewId = "password-forgot";
18811
18738
 
18812
- const initialState$9 = {
18739
+ const initialState$8 = {
18813
18740
  currentPassword: "",
18814
18741
  newPassword: "",
18815
18742
  confirmNewPassword: "",
@@ -18823,10 +18750,10 @@ const initialState$9 = {
18823
18750
  content: ""
18824
18751
  }
18825
18752
  };
18826
- const store$9 = /*#__PURE__*/createContext(initialState$9);
18753
+ const store$8 = /*#__PURE__*/createContext(initialState$8);
18827
18754
  const {
18828
- Provider: Provider$9
18829
- } = store$9;
18755
+ Provider: Provider$8
18756
+ } = store$8;
18830
18757
  const PasswordChangeContainer = ({
18831
18758
  style,
18832
18759
  className = "",
@@ -18978,21 +18905,21 @@ const PasswordChangeContainer = ({
18978
18905
  default:
18979
18906
  return state;
18980
18907
  }
18981
- }, initialState$9);
18908
+ }, initialState$8);
18982
18909
  return /*#__PURE__*/React__default.createElement("div", {
18983
18910
  style: { ...style
18984
18911
  },
18985
18912
  className: `pelcro-container pelcro-password-change-container ${className}`
18986
- }, /*#__PURE__*/React__default.createElement(Provider$9, {
18913
+ }, /*#__PURE__*/React__default.createElement(Provider$8, {
18987
18914
  value: {
18988
18915
  state,
18989
18916
  dispatch
18990
18917
  }
18991
18918
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18992
- store: store$9,
18919
+ store: store$8,
18993
18920
  key: i
18994
18921
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18995
- store: store$9
18922
+ store: store$8
18996
18923
  })));
18997
18924
  };
18998
18925
 
@@ -19003,7 +18930,7 @@ function PasswordChangeCurrentPassword(props) {
19003
18930
  currentPassword,
19004
18931
  currentPasswordError
19005
18932
  }
19006
- } = useContext(store$9);
18933
+ } = useContext(store$8);
19007
18934
  const handleBlur = useCallback(() => {
19008
18935
  return dispatch({
19009
18936
  type: VALIDATE_PASSWORD
@@ -19037,7 +18964,7 @@ function PasswordChangeNewPassword(props) {
19037
18964
  newPassword,
19038
18965
  newPasswordError
19039
18966
  }
19040
- } = useContext(store$9);
18967
+ } = useContext(store$8);
19041
18968
  const handleBlur = useCallback(() => {
19042
18969
  return dispatch({
19043
18970
  type: VALIDATE_NEW_PASSWORD
@@ -19071,7 +18998,7 @@ function PasswordChangeConfirmNewPassword(props) {
19071
18998
  confirmNewPassword,
19072
18999
  confirmNewPasswordError
19073
19000
  }
19074
- } = useContext(store$9);
19001
+ } = useContext(store$8);
19075
19002
  const handleBlur = useCallback(() => {
19076
19003
  return dispatch({
19077
19004
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -19112,7 +19039,7 @@ const PasswordChangeButton = ({
19112
19039
  confirmNewPasswordError
19113
19040
  },
19114
19041
  dispatch
19115
- } = useContext(store$9);
19042
+ } = useContext(store$8);
19116
19043
  const {
19117
19044
  t
19118
19045
  } = useTranslation("passwordChange");
@@ -19178,17 +19105,17 @@ const PasswordChangeModal = ({
19178
19105
  };
19179
19106
  PasswordChangeModal.viewId = "password-change";
19180
19107
 
19181
- const initialState$8 = {
19108
+ const initialState$7 = {
19182
19109
  buttonDisabled: false,
19183
19110
  alert: {
19184
19111
  type: "error",
19185
19112
  content: ""
19186
19113
  }
19187
19114
  };
19188
- const store$8 = /*#__PURE__*/createContext(initialState$8);
19115
+ const store$7 = /*#__PURE__*/createContext(initialState$7);
19189
19116
  const {
19190
- Provider: Provider$8
19191
- } = store$8;
19117
+ Provider: Provider$7
19118
+ } = store$7;
19192
19119
 
19193
19120
  const CartContainer = ({
19194
19121
  style,
@@ -19279,21 +19206,21 @@ const CartContainer = ({
19279
19206
  default:
19280
19207
  return state;
19281
19208
  }
19282
- }, initialState$8);
19209
+ }, initialState$7);
19283
19210
  return /*#__PURE__*/React__default.createElement("div", {
19284
19211
  style: { ...style
19285
19212
  },
19286
19213
  className: `pelcro-container pelcro-cart-container ${className}`
19287
- }, /*#__PURE__*/React__default.createElement(Provider$8, {
19214
+ }, /*#__PURE__*/React__default.createElement(Provider$7, {
19288
19215
  value: {
19289
19216
  state,
19290
19217
  dispatch
19291
19218
  }
19292
19219
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19293
- store: store$8,
19220
+ store: store$7,
19294
19221
  key: i
19295
19222
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19296
- store: store$8
19223
+ store: store$7
19297
19224
  })));
19298
19225
  };
19299
19226
 
@@ -19330,7 +19257,7 @@ const CartSubmit = ({
19330
19257
  buttonDisabled
19331
19258
  },
19332
19259
  dispatch
19333
- } = useContext(store$8);
19260
+ } = useContext(store$7);
19334
19261
  const {
19335
19262
  t
19336
19263
  } = useTranslation("cart");
@@ -19361,7 +19288,7 @@ const CartTotalPrice = () => {
19361
19288
  state: {
19362
19289
  alert
19363
19290
  }
19364
- } = useContext(store$8);
19291
+ } = useContext(store$7);
19365
19292
  const {
19366
19293
  cartItems
19367
19294
  } = usePelcro();
@@ -19674,7 +19601,7 @@ const OrderConfirmModal = props => {
19674
19601
  };
19675
19602
  OrderConfirmModal.viewId = "order-confirm";
19676
19603
 
19677
- const initialState$7 = {
19604
+ const initialState$6 = {
19678
19605
  email: "",
19679
19606
  firstName: "",
19680
19607
  lastName: "",
@@ -19686,10 +19613,10 @@ const initialState$7 = {
19686
19613
  content: ""
19687
19614
  }
19688
19615
  };
19689
- const store$7 = /*#__PURE__*/createContext(initialState$7);
19616
+ const store$6 = /*#__PURE__*/createContext(initialState$6);
19690
19617
  const {
19691
- Provider: Provider$7
19692
- } = store$7;
19618
+ Provider: Provider$6
19619
+ } = store$6;
19693
19620
 
19694
19621
  const GiftCreateContainer = ({
19695
19622
  style,
@@ -19793,21 +19720,21 @@ const GiftCreateContainer = ({
19793
19720
  default:
19794
19721
  return state;
19795
19722
  }
19796
- }, initialState$7);
19723
+ }, initialState$6);
19797
19724
  return /*#__PURE__*/React__default.createElement("div", {
19798
19725
  style: { ...style
19799
19726
  },
19800
19727
  className: `pelcro-container pelcro-gift-create-container ${className}`
19801
- }, /*#__PURE__*/React__default.createElement(Provider$7, {
19728
+ }, /*#__PURE__*/React__default.createElement(Provider$6, {
19802
19729
  value: {
19803
19730
  state,
19804
19731
  dispatch
19805
19732
  }
19806
19733
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19807
- store: store$7,
19734
+ store: store$6,
19808
19735
  key: i
19809
19736
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19810
- store: store$7
19737
+ store: store$6
19811
19738
  })));
19812
19739
  };
19813
19740
 
@@ -19821,7 +19748,7 @@ const GiftCreateSubmitButton = ({
19821
19748
  state: {
19822
19749
  disableSubmit
19823
19750
  }
19824
- } = useContext(store$7);
19751
+ } = useContext(store$6);
19825
19752
  const {
19826
19753
  t
19827
19754
  } = useTranslation("register");
@@ -19838,29 +19765,29 @@ const GiftCreateSubmitButton = ({
19838
19765
 
19839
19766
  const GiftCreateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
19840
19767
  initWithUserEmail: false,
19841
- store: store$7
19768
+ store: store$6
19842
19769
  }, props));
19843
19770
 
19844
19771
  const GiftCreateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
19845
- store: store$7
19772
+ store: store$6
19846
19773
  }, props));
19847
19774
 
19848
19775
  const GiftCreateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
19849
- store: store$7
19776
+ store: store$6
19850
19777
  }, props));
19851
19778
 
19852
- var _path$i;
19779
+ var _path$h;
19853
19780
 
19854
- function _extends$k() { _extends$k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
19781
+ function _extends$j() { _extends$j = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
19855
19782
 
19856
19783
  function SvgInfoCircle(props) {
19857
- return /*#__PURE__*/React.createElement("svg", _extends$k({
19784
+ return /*#__PURE__*/React.createElement("svg", _extends$j({
19858
19785
  xmlns: "http://www.w3.org/2000/svg",
19859
19786
  className: "plc-w-5 plc-h-5",
19860
19787
  fill: "none",
19861
19788
  viewBox: "0 0 24 24",
19862
19789
  stroke: "currentColor"
19863
- }, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
19790
+ }, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
19864
19791
  strokeLinecap: "round",
19865
19792
  strokeLinejoin: "round",
19866
19793
  strokeWidth: 2,
@@ -19931,7 +19858,7 @@ const GiftCreateStartDate = props => {
19931
19858
  const {
19932
19859
  dispatch,
19933
19860
  state
19934
- } = useContext(store$7);
19861
+ } = useContext(store$6);
19935
19862
 
19936
19863
  const handleInputChange = value => {
19937
19864
  dispatch({
@@ -20004,7 +19931,7 @@ function GiftCreateMessage(props) {
20004
19931
  const {
20005
19932
  dispatch,
20006
19933
  state
20007
- } = useContext(store$7);
19934
+ } = useContext(store$6);
20008
19935
  const MAX_CHARS_COUNT = 200;
20009
19936
  const remainingCharsCount = (_ref = MAX_CHARS_COUNT - ((_state$giftMessage = state.giftMessage) === null || _state$giftMessage === void 0 ? void 0 : _state$giftMessage.length)) !== null && _ref !== void 0 ? _ref : 0;
20010
19937
 
@@ -20128,7 +20055,7 @@ const GiftCreateModal = ({
20128
20055
  };
20129
20056
  GiftCreateModal.viewId = "gift-create";
20130
20057
 
20131
- const initialState$6 = {
20058
+ const initialState$5 = {
20132
20059
  giftCode: "",
20133
20060
  buttonDisabled: true,
20134
20061
  alert: {
@@ -20136,10 +20063,10 @@ const initialState$6 = {
20136
20063
  content: ""
20137
20064
  }
20138
20065
  };
20139
- const store$6 = /*#__PURE__*/createContext(initialState$6);
20066
+ const store$5 = /*#__PURE__*/createContext(initialState$5);
20140
20067
  const {
20141
- Provider: Provider$6
20142
- } = store$6;
20068
+ Provider: Provider$5
20069
+ } = store$5;
20143
20070
 
20144
20071
  const GiftRedeemContainer = ({
20145
20072
  style,
@@ -20204,21 +20131,21 @@ const GiftRedeemContainer = ({
20204
20131
  default:
20205
20132
  return state;
20206
20133
  }
20207
- }, initialState$6);
20134
+ }, initialState$5);
20208
20135
  return /*#__PURE__*/React__default.createElement("div", {
20209
20136
  style: { ...style
20210
20137
  },
20211
20138
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
20212
- }, /*#__PURE__*/React__default.createElement(Provider$6, {
20139
+ }, /*#__PURE__*/React__default.createElement(Provider$5, {
20213
20140
  value: {
20214
20141
  state,
20215
20142
  dispatch
20216
20143
  }
20217
20144
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
20218
- store: store$6,
20145
+ store: store$5,
20219
20146
  key: i
20220
20147
  })) : /*#__PURE__*/React__default.cloneElement(children, {
20221
- store: store$6
20148
+ store: store$5
20222
20149
  })));
20223
20150
  };
20224
20151
 
@@ -20255,7 +20182,7 @@ function GiftCode({
20255
20182
  }
20256
20183
 
20257
20184
  const GiftRedeemCode = props => /*#__PURE__*/React__default.createElement(GiftCode, Object.assign({
20258
- store: store$6
20185
+ store: store$5
20259
20186
  }, props));
20260
20187
 
20261
20188
  const GiftRedeemSubmitButton = ({
@@ -20268,7 +20195,7 @@ const GiftRedeemSubmitButton = ({
20268
20195
  state: {
20269
20196
  disableSubmit
20270
20197
  }
20271
- } = useContext(store$6);
20198
+ } = useContext(store$5);
20272
20199
  const {
20273
20200
  t
20274
20201
  } = useTranslation("register");
@@ -20361,7 +20288,7 @@ const moveDefaultAddressToStart = addresses => {
20361
20288
  return [defaultAddress, ...addressesWithoutDefault];
20362
20289
  };
20363
20290
 
20364
- const initialState$5 = {
20291
+ const initialState$4 = {
20365
20292
  addresses: [],
20366
20293
  selectedAddressId: null,
20367
20294
  isSubmitting: false,
@@ -20370,10 +20297,10 @@ const initialState$5 = {
20370
20297
  content: ""
20371
20298
  }
20372
20299
  };
20373
- const store$5 = /*#__PURE__*/createContext(initialState$5);
20300
+ const store$4 = /*#__PURE__*/createContext(initialState$4);
20374
20301
  const {
20375
- Provider: Provider$5
20376
- } = store$5;
20302
+ Provider: Provider$4
20303
+ } = store$4;
20377
20304
 
20378
20305
  const AddressSelectContainer = ({
20379
20306
  style,
@@ -20468,7 +20395,7 @@ const AddressSelectContainer = ({
20468
20395
  default:
20469
20396
  return state;
20470
20397
  }
20471
- }, initialState$5);
20398
+ }, initialState$4);
20472
20399
  useEffect(() => {
20473
20400
  var _window$Pelcro$user$r;
20474
20401
 
@@ -20481,16 +20408,16 @@ const AddressSelectContainer = ({
20481
20408
  style: { ...style
20482
20409
  },
20483
20410
  className: `pelcro-container pelcro-address-select-container ${className}`
20484
- }, /*#__PURE__*/React__default.createElement(Provider$5, {
20411
+ }, /*#__PURE__*/React__default.createElement(Provider$4, {
20485
20412
  value: {
20486
20413
  state,
20487
20414
  dispatch
20488
20415
  }
20489
20416
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
20490
- store: store$5,
20417
+ store: store$4,
20491
20418
  key: i
20492
20419
  })) : /*#__PURE__*/React__default.cloneElement(children, {
20493
- store: store$5
20420
+ store: store$4
20494
20421
  })));
20495
20422
  };
20496
20423
 
@@ -20501,7 +20428,7 @@ const AddressSelectList = () => {
20501
20428
  addresses,
20502
20429
  selectedAddressId
20503
20430
  }
20504
- } = useContext(store$5);
20431
+ } = useContext(store$4);
20505
20432
 
20506
20433
  const handleAddressSelect = event => {
20507
20434
  dispatch({
@@ -20545,7 +20472,7 @@ const AddressSelectSubmit = ({
20545
20472
  selectedAddressId,
20546
20473
  isSubmitting
20547
20474
  }
20548
- } = useContext(store$5);
20475
+ } = useContext(store$4);
20549
20476
  const {
20550
20477
  t
20551
20478
  } = useTranslation("address");
@@ -20641,7 +20568,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
20641
20568
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
20642
20569
  };
20643
20570
 
20644
- const initialState$4 = {
20571
+ const initialState$3 = {
20645
20572
  paymentMethods: [],
20646
20573
  selectedPaymentMethodId: null,
20647
20574
  isSubmitting: false,
@@ -20650,10 +20577,10 @@ const initialState$4 = {
20650
20577
  content: ""
20651
20578
  }
20652
20579
  };
20653
- const store$4 = /*#__PURE__*/createContext(initialState$4);
20580
+ const store$3 = /*#__PURE__*/createContext(initialState$3);
20654
20581
  const {
20655
- Provider: Provider$4
20656
- } = store$4;
20582
+ Provider: Provider$3
20583
+ } = store$3;
20657
20584
 
20658
20585
  const PaymentMethodSelectContainer = ({
20659
20586
  style,
@@ -20712,7 +20639,7 @@ const PaymentMethodSelectContainer = ({
20712
20639
  default:
20713
20640
  return state;
20714
20641
  }
20715
- }, initialState$4);
20642
+ }, initialState$3);
20716
20643
  useEffect(() => {
20717
20644
  var _window$Pelcro$user$r3;
20718
20645
 
@@ -20725,16 +20652,16 @@ const PaymentMethodSelectContainer = ({
20725
20652
  style: { ...style
20726
20653
  },
20727
20654
  className: `pelcro-container pelcro-payment-select-container ${className}`
20728
- }, /*#__PURE__*/React__default.createElement(Provider$4, {
20655
+ }, /*#__PURE__*/React__default.createElement(Provider$3, {
20729
20656
  value: {
20730
20657
  state,
20731
20658
  dispatch
20732
20659
  }
20733
20660
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
20734
- store: store$4,
20661
+ store: store$3,
20735
20662
  key: i
20736
20663
  })) : /*#__PURE__*/React__default.cloneElement(children, {
20737
- store: store$4
20664
+ store: store$3
20738
20665
  })));
20739
20666
  };
20740
20667
 
@@ -20748,7 +20675,7 @@ const PaymentMethodSelectList = () => {
20748
20675
  paymentMethods,
20749
20676
  selectedPaymentMethodId
20750
20677
  }
20751
- } = useContext(store$4);
20678
+ } = useContext(store$3);
20752
20679
 
20753
20680
  const handlePaymentMethodSelect = event => {
20754
20681
  dispatch({
@@ -20798,7 +20725,7 @@ const PaymentMethodSelectSubmit = ({
20798
20725
  selectedPaymentMethodId,
20799
20726
  isSubmitting
20800
20727
  }
20801
- } = useContext(store$4);
20728
+ } = useContext(store$3);
20802
20729
  return /*#__PURE__*/React__default.createElement(Button, Object.assign({
20803
20730
  onClick: () => {
20804
20731
  dispatch({
@@ -20872,8 +20799,8 @@ const PaymentMethodSelectModal = ({
20872
20799
  };
20873
20800
  PaymentMethodSelectModal.viewId = "payment-method-select";
20874
20801
 
20875
- function _extends$j() {
20876
- _extends$j = Object.assign || function (target) {
20802
+ function _extends$i() {
20803
+ _extends$i = Object.assign || function (target) {
20877
20804
  for (var i = 1; i < arguments.length; i++) {
20878
20805
  var source = arguments[i];
20879
20806
 
@@ -20887,7 +20814,7 @@ function _extends$j() {
20887
20814
  return target;
20888
20815
  };
20889
20816
 
20890
- return _extends$j.apply(this, arguments);
20817
+ return _extends$i.apply(this, arguments);
20891
20818
  }
20892
20819
 
20893
20820
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -21071,7 +20998,7 @@ function render(props, propsBag, defaultTag, features, visible) {
21071
20998
  return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
21072
20999
  return null;
21073
21000
  }, _match[RenderStrategy.Hidden] = function () {
21074
- return _render(_extends$j({}, _rest, {
21001
+ return _render(_extends$i({}, _rest, {
21075
21002
  hidden: true,
21076
21003
  style: {
21077
21004
  display: 'none'
@@ -21599,7 +21526,7 @@ function TransitionChild(props) {
21599
21526
  var passthroughProps = rest;
21600
21527
  return React__default.createElement(NestingContext.Provider, {
21601
21528
  value: nesting
21602
- }, render(_extends$j({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
21529
+ }, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
21603
21530
  }
21604
21531
 
21605
21532
  function Transition(props) {
@@ -21643,7 +21570,7 @@ function Transition(props) {
21643
21570
  value: nestingBag
21644
21571
  }, React__default.createElement(TransitionContext.Provider, {
21645
21572
  value: transitionBag
21646
- }, render(_extends$j({}, sharedProps, {
21573
+ }, render(_extends$i({}, sharedProps, {
21647
21574
  as: Fragment,
21648
21575
  children: React__default.createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
21649
21576
  }), propsBag, Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
@@ -21770,12 +21697,12 @@ var ActionTypes;
21770
21697
  })(ActionTypes || (ActionTypes = {}));
21771
21698
 
21772
21699
  (_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
21773
- return _extends$j({}, state, {
21700
+ return _extends$i({}, state, {
21774
21701
  activeItemIndex: null,
21775
21702
  menuState: MenuStates.Closed
21776
21703
  });
21777
21704
  }, _reducers[ActionTypes.OpenMenu] = function (state) {
21778
- return _extends$j({}, state, {
21705
+ return _extends$i({}, state, {
21779
21706
  menuState: MenuStates.Open
21780
21707
  });
21781
21708
  }, _reducers[ActionTypes.GoToItem] = function (state, action) {
@@ -21794,7 +21721,7 @@ var ActionTypes;
21794
21721
  }
21795
21722
  });
21796
21723
  if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
21797
- return _extends$j({}, state, {
21724
+ return _extends$i({}, state, {
21798
21725
  searchQuery: '',
21799
21726
  activeItemIndex: activeItemIndex
21800
21727
  });
@@ -21805,19 +21732,19 @@ var ActionTypes;
21805
21732
 
21806
21733
  return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
21807
21734
  });
21808
- if (match === -1 || match === state.activeItemIndex) return _extends$j({}, state, {
21735
+ if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
21809
21736
  searchQuery: searchQuery
21810
21737
  });
21811
- return _extends$j({}, state, {
21738
+ return _extends$i({}, state, {
21812
21739
  searchQuery: searchQuery,
21813
21740
  activeItemIndex: match
21814
21741
  });
21815
21742
  }, _reducers[ActionTypes.ClearSearch] = function (state) {
21816
- return _extends$j({}, state, {
21743
+ return _extends$i({}, state, {
21817
21744
  searchQuery: ''
21818
21745
  });
21819
21746
  }, _reducers[ActionTypes.RegisterItem] = function (state, action) {
21820
- return _extends$j({}, state, {
21747
+ return _extends$i({}, state, {
21821
21748
  items: [].concat(state.items, [{
21822
21749
  id: action.id,
21823
21750
  dataRef: action.dataRef
@@ -21830,7 +21757,7 @@ var ActionTypes;
21830
21757
  return a.id === action.id;
21831
21758
  });
21832
21759
  if (idx !== -1) nextItems.splice(idx, 1);
21833
- return _extends$j({}, state, {
21760
+ return _extends$i({}, state, {
21834
21761
  items: nextItems,
21835
21762
  activeItemIndex: function () {
21836
21763
  if (idx === state.activeItemIndex) return null;
@@ -21869,19 +21796,19 @@ var ActionTypes$1;
21869
21796
  (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
21870
21797
  if (state.disabled) return state;
21871
21798
  if (state.listboxState === ListboxStates.Closed) return state;
21872
- return _extends$j({}, state, {
21799
+ return _extends$i({}, state, {
21873
21800
  activeOptionIndex: null,
21874
21801
  listboxState: ListboxStates.Closed
21875
21802
  });
21876
21803
  }, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
21877
21804
  if (state.disabled) return state;
21878
21805
  if (state.listboxState === ListboxStates.Open) return state;
21879
- return _extends$j({}, state, {
21806
+ return _extends$i({}, state, {
21880
21807
  listboxState: ListboxStates.Open
21881
21808
  });
21882
21809
  }, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
21883
21810
  if (state.disabled === action.disabled) return state;
21884
- return _extends$j({}, state, {
21811
+ return _extends$i({}, state, {
21885
21812
  disabled: action.disabled
21886
21813
  });
21887
21814
  }, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
@@ -21902,7 +21829,7 @@ var ActionTypes$1;
21902
21829
  }
21903
21830
  });
21904
21831
  if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
21905
- return _extends$j({}, state, {
21832
+ return _extends$i({}, state, {
21906
21833
  searchQuery: '',
21907
21834
  activeOptionIndex: activeOptionIndex
21908
21835
  });
@@ -21915,10 +21842,10 @@ var ActionTypes$1;
21915
21842
 
21916
21843
  return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
21917
21844
  });
21918
- if (match === -1 || match === state.activeOptionIndex) return _extends$j({}, state, {
21845
+ if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
21919
21846
  searchQuery: searchQuery
21920
21847
  });
21921
- return _extends$j({}, state, {
21848
+ return _extends$i({}, state, {
21922
21849
  searchQuery: searchQuery,
21923
21850
  activeOptionIndex: match
21924
21851
  });
@@ -21926,11 +21853,11 @@ var ActionTypes$1;
21926
21853
  if (state.disabled) return state;
21927
21854
  if (state.listboxState === ListboxStates.Closed) return state;
21928
21855
  if (state.searchQuery === '') return state;
21929
- return _extends$j({}, state, {
21856
+ return _extends$i({}, state, {
21930
21857
  searchQuery: ''
21931
21858
  });
21932
21859
  }, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
21933
- return _extends$j({}, state, {
21860
+ return _extends$i({}, state, {
21934
21861
  options: [].concat(state.options, [{
21935
21862
  id: action.id,
21936
21863
  dataRef: action.dataRef
@@ -21943,7 +21870,7 @@ var ActionTypes$1;
21943
21870
  return a.id === action.id;
21944
21871
  });
21945
21872
  if (idx !== -1) nextOptions.splice(idx, 1);
21946
- return _extends$j({}, state, {
21873
+ return _extends$i({}, state, {
21947
21874
  options: nextOptions,
21948
21875
  activeOptionIndex: function () {
21949
21876
  if (idx === state.activeOptionIndex) return null;
@@ -22004,18 +21931,18 @@ const getPaymentCardIcon = name => {
22004
21931
  }));
22005
21932
  };
22006
21933
 
22007
- var _path$h;
21934
+ var _path$g;
22008
21935
 
22009
- function _extends$i() { _extends$i = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$i.apply(this, arguments); }
21936
+ function _extends$h() { _extends$h = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
22010
21937
 
22011
21938
  function SvgChevronRight(props) {
22012
- return /*#__PURE__*/React.createElement("svg", _extends$i({
21939
+ return /*#__PURE__*/React.createElement("svg", _extends$h({
22013
21940
  className: "plc-w-6 plc-h-6",
22014
21941
  xmlns: "http://www.w3.org/2000/svg",
22015
21942
  fill: "none",
22016
21943
  viewBox: "0 0 24 24",
22017
21944
  stroke: "currentColor"
22018
- }, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
21945
+ }, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
22019
21946
  strokeLinecap: "round",
22020
21947
  strokeLinejoin: "round",
22021
21948
  strokeWidth: 2,
@@ -22231,18 +22158,18 @@ const SavedItems = ({
22231
22158
  });
22232
22159
  };
22233
22160
 
22234
- var _path$g;
22161
+ var _path$f;
22235
22162
 
22236
- function _extends$h() { _extends$h = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
22163
+ function _extends$g() { _extends$g = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
22237
22164
 
22238
22165
  function SvgRefresh(props) {
22239
- return /*#__PURE__*/React.createElement("svg", _extends$h({
22166
+ return /*#__PURE__*/React.createElement("svg", _extends$g({
22240
22167
  className: "plc-w-4 plc-h-4 plc-mr-1",
22241
22168
  xmlns: "http://www.w3.org/2000/svg",
22242
22169
  fill: "none",
22243
22170
  viewBox: "0 0 24 24",
22244
22171
  stroke: "currentColor"
22245
- }, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
22172
+ }, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
22246
22173
  strokeLinecap: "round",
22247
22174
  strokeLinejoin: "round",
22248
22175
  strokeWidth: 2,
@@ -22250,35 +22177,35 @@ function SvgRefresh(props) {
22250
22177
  })));
22251
22178
  }
22252
22179
 
22253
- var _path$f;
22180
+ var _path$e;
22254
22181
 
22255
- function _extends$g() { _extends$g = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
22182
+ function _extends$f() { _extends$f = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
22256
22183
 
22257
22184
  function SvgCalendar(props) {
22258
- return /*#__PURE__*/React.createElement("svg", _extends$g({
22185
+ return /*#__PURE__*/React.createElement("svg", _extends$f({
22259
22186
  xmlns: "http://www.w3.org/2000/svg",
22260
22187
  className: "plc-h-4 plc-w-4 plc-mr-1",
22261
22188
  viewBox: "0 0 20 20",
22262
22189
  fill: "currentColor"
22263
- }, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
22190
+ }, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
22264
22191
  fillRule: "evenodd",
22265
22192
  d: "M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",
22266
22193
  clipRule: "evenodd"
22267
22194
  })));
22268
22195
  }
22269
22196
 
22270
- var _path$e;
22197
+ var _path$d;
22271
22198
 
22272
- function _extends$f() { _extends$f = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
22199
+ function _extends$e() { _extends$e = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
22273
22200
 
22274
22201
  function SvgPlus(props) {
22275
- return /*#__PURE__*/React.createElement("svg", _extends$f({
22202
+ return /*#__PURE__*/React.createElement("svg", _extends$e({
22276
22203
  className: "plc-w-5 plc-h-5",
22277
22204
  xmlns: "http://www.w3.org/2000/svg",
22278
22205
  fill: "none",
22279
22206
  viewBox: "0 0 24 24",
22280
22207
  stroke: "currentColor"
22281
- }, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
22208
+ }, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
22282
22209
  strokeLinecap: "round",
22283
22210
  strokeLinejoin: "round",
22284
22211
  strokeWidth: 2,
@@ -22286,17 +22213,17 @@ function SvgPlus(props) {
22286
22213
  })));
22287
22214
  }
22288
22215
 
22289
- var _path$d;
22216
+ var _path$c;
22290
22217
 
22291
- function _extends$e() { _extends$e = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
22218
+ function _extends$d() { _extends$d = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
22292
22219
 
22293
22220
  function SvgCheckMark(props) {
22294
- return /*#__PURE__*/React.createElement("svg", _extends$e({
22221
+ return /*#__PURE__*/React.createElement("svg", _extends$d({
22295
22222
  className: "plc-w-4 plc-h-4 plc-mr-1",
22296
22223
  xmlns: "http://www.w3.org/2000/svg",
22297
22224
  viewBox: "0 0 20 20",
22298
22225
  fill: "currentColor"
22299
- }, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
22226
+ }, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
22300
22227
  fillRule: "evenodd",
22301
22228
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
22302
22229
  clipRule: "evenodd"
@@ -22360,8 +22287,7 @@ const SubscriptionsItems = ({
22360
22287
  } = useTranslation("dashboard");
22361
22288
  const {
22362
22289
  switchView,
22363
- switchToAddressView,
22364
- switchToPaymentView
22290
+ isAuthenticated
22365
22291
  } = usePelcro();
22366
22292
  const subs = getNonDonationSubs();
22367
22293
  if (subs.length === 0) return null;
@@ -22403,12 +22329,7 @@ const SubscriptionsItems = ({
22403
22329
  const plan = window.Pelcro.plan.getById(plan_id);
22404
22330
  setProductAndPlan(product, plan);
22405
22331
  setSubscriptionIdToRenew(sub.id);
22406
-
22407
- if (product.address_required) {
22408
- return switchToAddressView();
22409
- }
22410
-
22411
- return switchToPaymentView();
22332
+ setView("plan-select");
22412
22333
  };
22413
22334
 
22414
22335
  const getPhases = () => {
@@ -22597,18 +22518,18 @@ Accordion.item = function AccordionItem({
22597
22518
  }, content)) : null;
22598
22519
  };
22599
22520
 
22600
- var _path$c;
22521
+ var _path$b;
22601
22522
 
22602
- function _extends$d() { _extends$d = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
22523
+ function _extends$c() { _extends$c = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
22603
22524
 
22604
22525
  function SvgExit(props) {
22605
- return /*#__PURE__*/React.createElement("svg", _extends$d({
22526
+ return /*#__PURE__*/React.createElement("svg", _extends$c({
22606
22527
  className: "plc-w-6 plc-h-6",
22607
22528
  xmlns: "http://www.w3.org/2000/svg",
22608
22529
  fill: "none",
22609
22530
  viewBox: "0 0 24 24",
22610
22531
  stroke: "currentColor"
22611
- }, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
22532
+ }, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
22612
22533
  strokeLinecap: "round",
22613
22534
  strokeLinejoin: "round",
22614
22535
  strokeWidth: 2,
@@ -22616,17 +22537,17 @@ function SvgExit(props) {
22616
22537
  })));
22617
22538
  }
22618
22539
 
22619
- var _path$b;
22540
+ var _path$a;
22620
22541
 
22621
- function _extends$c() { _extends$c = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
22542
+ function _extends$b() { _extends$b = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
22622
22543
 
22623
22544
  function SvgUser(props) {
22624
- return /*#__PURE__*/React.createElement("svg", _extends$c({
22545
+ return /*#__PURE__*/React.createElement("svg", _extends$b({
22625
22546
  xmlns: "http://www.w3.org/2000/svg",
22626
22547
  fill: "none",
22627
22548
  viewBox: "0 0 24 24",
22628
22549
  stroke: "currentColor"
22629
- }, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
22550
+ }, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
22630
22551
  strokeLinecap: "round",
22631
22552
  strokeLinejoin: "round",
22632
22553
  strokeWidth: 2,
@@ -22634,18 +22555,18 @@ function SvgUser(props) {
22634
22555
  })));
22635
22556
  }
22636
22557
 
22637
- var _path$a;
22558
+ var _path$9;
22638
22559
 
22639
- function _extends$b() { _extends$b = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
22560
+ function _extends$a() { _extends$a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
22640
22561
 
22641
22562
  function SvgNewsletter(props) {
22642
- return /*#__PURE__*/React.createElement("svg", _extends$b({
22563
+ return /*#__PURE__*/React.createElement("svg", _extends$a({
22643
22564
  xmlns: "http://www.w3.org/2000/svg",
22644
22565
  className: "plc-h-5 plc-w-5",
22645
22566
  fill: "none",
22646
22567
  viewBox: "0 0 24 24",
22647
22568
  stroke: "currentColor"
22648
- }, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
22569
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/React.createElement("path", {
22649
22570
  strokeLinecap: "round",
22650
22571
  strokeLinejoin: "round",
22651
22572
  strokeWidth: 2,
@@ -22653,18 +22574,18 @@ function SvgNewsletter(props) {
22653
22574
  })));
22654
22575
  }
22655
22576
 
22656
- var _path$9;
22577
+ var _path$8;
22657
22578
 
22658
- function _extends$a() { _extends$a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
22579
+ function _extends$9() { _extends$9 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
22659
22580
 
22660
22581
  function SvgDocument(props) {
22661
- return /*#__PURE__*/React.createElement("svg", _extends$a({
22582
+ return /*#__PURE__*/React.createElement("svg", _extends$9({
22662
22583
  xmlns: "http://www.w3.org/2000/svg",
22663
22584
  className: "plc-h-6 plc-w-6 plc-mr-2",
22664
22585
  fill: "none",
22665
22586
  viewBox: "0 0 24 24",
22666
22587
  stroke: "currentColor"
22667
- }, props), _path$9 || (_path$9 = /*#__PURE__*/React.createElement("path", {
22588
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React.createElement("path", {
22668
22589
  strokeLinecap: "round",
22669
22590
  strokeLinejoin: "round",
22670
22591
  strokeWidth: 2,
@@ -22672,18 +22593,18 @@ function SvgDocument(props) {
22672
22593
  })));
22673
22594
  }
22674
22595
 
22675
- var _path$8;
22596
+ var _path$7;
22676
22597
 
22677
- function _extends$9() { _extends$9 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
22598
+ function _extends$8() { _extends$8 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
22678
22599
 
22679
22600
  function SvgPaymentCard(props) {
22680
- return /*#__PURE__*/React.createElement("svg", _extends$9({
22601
+ return /*#__PURE__*/React.createElement("svg", _extends$8({
22681
22602
  className: "plc-w-6 plc-h-6 plc-mr-2",
22682
22603
  xmlns: "http://www.w3.org/2000/svg",
22683
22604
  fill: "none",
22684
22605
  viewBox: "0 0 24 24",
22685
22606
  stroke: "currentColor"
22686
- }, props), _path$8 || (_path$8 = /*#__PURE__*/React.createElement("path", {
22607
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React.createElement("path", {
22687
22608
  strokeLinecap: "round",
22688
22609
  strokeLinejoin: "round",
22689
22610
  strokeWidth: 2,
@@ -22691,18 +22612,18 @@ function SvgPaymentCard(props) {
22691
22612
  })));
22692
22613
  }
22693
22614
 
22694
- var _path$7, _path2$1;
22615
+ var _path$6, _path2$1;
22695
22616
 
22696
- function _extends$8() { _extends$8 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
22617
+ function _extends$7() { _extends$7 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
22697
22618
 
22698
22619
  function SvgLocationPin(props) {
22699
- return /*#__PURE__*/React.createElement("svg", _extends$8({
22620
+ return /*#__PURE__*/React.createElement("svg", _extends$7({
22700
22621
  className: "plc-w-6 plc-h-6 plc-mr-2",
22701
22622
  xmlns: "http://www.w3.org/2000/svg",
22702
22623
  fill: "none",
22703
22624
  viewBox: "0 0 24 24",
22704
22625
  stroke: "currentColor"
22705
- }, props), _path$7 || (_path$7 = /*#__PURE__*/React.createElement("path", {
22626
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React.createElement("path", {
22706
22627
  strokeLinecap: "round",
22707
22628
  strokeLinejoin: "round",
22708
22629
  strokeWidth: 2,
@@ -22717,10 +22638,10 @@ function SvgLocationPin(props) {
22717
22638
 
22718
22639
  var _switch;
22719
22640
 
22720
- function _extends$7() { _extends$7 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
22641
+ function _extends$6() { _extends$6 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
22721
22642
 
22722
22643
  function SvgSubscription(props) {
22723
- return /*#__PURE__*/React.createElement("svg", _extends$7({
22644
+ return /*#__PURE__*/React.createElement("svg", _extends$6({
22724
22645
  xmlns: "http://www.w3.org/2000/svg",
22725
22646
  viewBox: "0 0 100 125",
22726
22647
  fill: "currentColor"
@@ -22735,18 +22656,18 @@ function SvgSubscription(props) {
22735
22656
  }))))));
22736
22657
  }
22737
22658
 
22738
- var _path$6;
22659
+ var _path$5;
22739
22660
 
22740
- function _extends$6() { _extends$6 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
22661
+ function _extends$5() { _extends$5 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
22741
22662
 
22742
22663
  function SvgShopping(props) {
22743
- return /*#__PURE__*/React.createElement("svg", _extends$6({
22664
+ return /*#__PURE__*/React.createElement("svg", _extends$5({
22744
22665
  className: "plc-w-6 plc-h-6 plc-mr-2",
22745
22666
  xmlns: "http://www.w3.org/2000/svg",
22746
22667
  fill: "none",
22747
22668
  viewBox: "0 0 24 24",
22748
22669
  stroke: "currentColor"
22749
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React.createElement("path", {
22670
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React.createElement("path", {
22750
22671
  strokeLinecap: "round",
22751
22672
  strokeLinejoin: "round",
22752
22673
  strokeWidth: 2,
@@ -22754,18 +22675,18 @@ function SvgShopping(props) {
22754
22675
  })));
22755
22676
  }
22756
22677
 
22757
- var _path$5;
22678
+ var _path$4;
22758
22679
 
22759
- function _extends$5() { _extends$5 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
22680
+ function _extends$4() { _extends$4 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
22760
22681
 
22761
22682
  function SvgBookmark(props) {
22762
- return /*#__PURE__*/React.createElement("svg", _extends$5({
22683
+ return /*#__PURE__*/React.createElement("svg", _extends$4({
22763
22684
  className: "plc-w-6 plc-h-6 plc-mr-2",
22764
22685
  xmlns: "http://www.w3.org/2000/svg",
22765
22686
  fill: "none",
22766
22687
  viewBox: "0 0 24 24",
22767
22688
  stroke: "currentColor"
22768
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React.createElement("path", {
22689
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React.createElement("path", {
22769
22690
  strokeLinecap: "round",
22770
22691
  strokeLinejoin: "round",
22771
22692
  strokeWidth: 2,
@@ -22773,33 +22694,33 @@ function SvgBookmark(props) {
22773
22694
  })));
22774
22695
  }
22775
22696
 
22776
- var _path$4;
22697
+ var _path$3;
22777
22698
 
22778
- function _extends$4() { _extends$4 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
22699
+ function _extends$3() { _extends$3 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
22779
22700
 
22780
22701
  function SvgKey(props) {
22781
- return /*#__PURE__*/React.createElement("svg", _extends$4({
22702
+ return /*#__PURE__*/React.createElement("svg", _extends$3({
22782
22703
  xmlns: "http://www.w3.org/2000/svg",
22783
22704
  viewBox: "0 0 20 20",
22784
22705
  fill: "currentColor"
22785
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React.createElement("path", {
22706
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
22786
22707
  fillRule: "evenodd",
22787
22708
  d: "M18 8a6 6 0 01-7.743 5.743L10 14l-1 1-1 1H6v2H2v-4l4.257-4.257A6 6 0 1118 8zm-6-4a1 1 0 100 2 2 2 0 012 2 1 1 0 102 0 4 4 0 00-4-4z",
22788
22709
  clipRule: "evenodd"
22789
22710
  })));
22790
22711
  }
22791
22712
 
22792
- var _path$3;
22713
+ var _path$2;
22793
22714
 
22794
- function _extends$3() { _extends$3 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
22715
+ function _extends$2() { _extends$2 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
22795
22716
 
22796
22717
  function SvgDonate(props) {
22797
- return /*#__PURE__*/React.createElement("svg", _extends$3({
22718
+ return /*#__PURE__*/React.createElement("svg", _extends$2({
22798
22719
  width: 24,
22799
22720
  height: 24,
22800
22721
  fill: "currentColor",
22801
22722
  xmlns: "http://www.w3.org/2000/svg"
22802
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
22723
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
22803
22724
  d: "M4 21h9.62a3.995 3.995 0 003.037-1.397l5.102-5.952a1 1 0 00-.442-1.6l-1.968-.656a3.043 3.043 0 00-2.823.503l-3.185 2.547-.617-1.235A3.98 3.98 0 009.146 11H4c-1.103 0-2 .897-2 2v6c0 1.103.897 2 2 2zm0-8h5.146c.763 0 1.448.423 1.789 1.105l.447.895H7v2h6.014a.996.996 0 00.442-.11l.003-.001.004-.002h.003l.002-.001h.004l.001-.001c.009.003.003-.001.003-.001.01 0 .002-.001.002-.001h.001l.002-.001.003-.001.002-.001.002-.001.003-.001.002-.001c.003 0 .001-.001.002-.001l.003-.002.002-.001.002-.001.003-.001.002-.001h.001l.002-.001h.001l.002-.001.002-.001c.009-.001.003-.001.003-.001l.002-.001a.915.915 0 00.11-.078l4.146-3.317c.262-.208.623-.273.94-.167l.557.186-4.133 4.823a2.029 2.029 0 01-1.52.688H4v-6zM16 2h-.017c-.163.002-1.006.039-1.983.705-.951-.648-1.774-.7-1.968-.704L12.002 2h-.004c-.801 0-1.555.313-2.119.878C9.313 3.445 9 4.198 9 5s.313 1.555.861 2.104l3.414 3.586a1.006 1.006 0 001.45-.001l3.396-3.568C18.688 6.555 19 5.802 19 5s-.313-1.555-.878-2.121A2.978 2.978 0 0016.002 2H16zm1 3c0 .267-.104.518-.311.725L14 8.55l-2.707-2.843C11.104 5.518 11 5.267 11 5s.104-.518.294-.708A.977.977 0 0111.979 4c.025.001.502.032 1.067.485.081.065.163.139.247.222l.707.707.707-.707c.084-.083.166-.157.247-.222.529-.425.976-.478 1.052-.484a.987.987 0 01.701.292c.189.189.293.44.293.707z"
22804
22725
  })));
22805
22726
  }
@@ -23126,10 +23047,9 @@ class Dashboard extends Component {
23126
23047
  }) => {
23127
23048
  if (isGift) {
23128
23049
  this.props.setProductAndPlan(null, null, true);
23129
- return this.props.setView("plan-select");
23130
23050
  }
23131
23051
 
23132
- return this.props.setView("subscription-options");
23052
+ return this.props.setView("plan-select");
23133
23053
  });
23134
23054
 
23135
23055
  _defineProperty$3(this, "displayAddressCreate", () => {
@@ -23597,7 +23517,7 @@ const DashboardOpenButton = () => {
23597
23517
  };
23598
23518
  DashboardOpenButton.viewId = "dashboard-open";
23599
23519
 
23600
- const initialState$3 = {
23520
+ const initialState$2 = {
23601
23521
  imageSrc: null,
23602
23522
  crop: {
23603
23523
  x: 0,
@@ -23611,10 +23531,10 @@ const initialState$3 = {
23611
23531
  content: ""
23612
23532
  }
23613
23533
  };
23614
- const store$3 = /*#__PURE__*/createContext(initialState$3);
23534
+ const store$2 = /*#__PURE__*/createContext(initialState$2);
23615
23535
  const {
23616
- Provider: Provider$3
23617
- } = store$3;
23536
+ Provider: Provider$2
23537
+ } = store$2;
23618
23538
 
23619
23539
  const ProfilePicChangeContainer = ({
23620
23540
  style,
@@ -23748,21 +23668,21 @@ const ProfilePicChangeContainer = ({
23748
23668
  default:
23749
23669
  return state;
23750
23670
  }
23751
- }, initialState$3);
23671
+ }, initialState$2);
23752
23672
  return /*#__PURE__*/React__default.createElement("div", {
23753
23673
  style: { ...style
23754
23674
  },
23755
23675
  className: `pelcro-container pelcro-profile-picture-container ${className}`
23756
- }, /*#__PURE__*/React__default.createElement(Provider$3, {
23676
+ }, /*#__PURE__*/React__default.createElement(Provider$2, {
23757
23677
  value: {
23758
23678
  state,
23759
23679
  dispatch
23760
23680
  }
23761
23681
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
23762
- store: store$3,
23682
+ store: store$2,
23763
23683
  key: i
23764
23684
  })) : /*#__PURE__*/React__default.cloneElement(children, {
23765
- store: store$3
23685
+ store: store$2
23766
23686
  })));
23767
23687
  };
23768
23688
  /**
@@ -23824,7 +23744,7 @@ const ProfilePicChangeButton = ({
23824
23744
  isSubmitting
23825
23745
  },
23826
23746
  dispatch
23827
- } = useContext(store$3);
23747
+ } = useContext(store$2);
23828
23748
  const {
23829
23749
  t
23830
23750
  } = useTranslation("userEdit");
@@ -25192,7 +25112,7 @@ const ProfilePicChangeCropper = ({
25192
25112
  zoom
25193
25113
  },
25194
25114
  dispatch
25195
- } = useContext(store$3);
25115
+ } = useContext(store$2);
25196
25116
  return /*#__PURE__*/React__default.createElement("div", {
25197
25117
  className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
25198
25118
  }, /*#__PURE__*/React__default.createElement(Cropper, Object.assign({
@@ -25234,7 +25154,7 @@ const ProfilePicChangeZoom = ({
25234
25154
  zoom
25235
25155
  },
25236
25156
  dispatch
25237
- } = useContext(store$3);
25157
+ } = useContext(store$2);
25238
25158
  const {
25239
25159
  t
25240
25160
  } = useTranslation("userEdit");
@@ -25257,18 +25177,18 @@ const ProfilePicChangeZoom = ({
25257
25177
  }, otherProps)));
25258
25178
  };
25259
25179
 
25260
- var _path$2;
25180
+ var _path$1;
25261
25181
 
25262
- function _extends$2() { _extends$2 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
25182
+ function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
25263
25183
 
25264
25184
  function SvgPhotograph(props) {
25265
- return /*#__PURE__*/React.createElement("svg", _extends$2({
25185
+ return /*#__PURE__*/React.createElement("svg", _extends$1({
25266
25186
  xmlns: "http://www.w3.org/2000/svg",
25267
25187
  className: "plc-h-6 plc-w-6",
25268
25188
  fill: "none",
25269
25189
  viewBox: "0 0 24 24",
25270
25190
  stroke: "currentColor"
25271
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
25191
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
25272
25192
  strokeLinecap: "round",
25273
25193
  strokeLinejoin: "round",
25274
25194
  strokeWidth: 2,
@@ -25286,7 +25206,7 @@ const ProfilePicChangeSelectButton = ({
25286
25206
  state: {
25287
25207
  isSubmitting
25288
25208
  }
25289
- } = useContext(store$3);
25209
+ } = useContext(store$2);
25290
25210
  const {
25291
25211
  t
25292
25212
  } = useTranslation("userEdit");
@@ -25328,7 +25248,7 @@ const ProfilePicChangeRemoveButton = ({
25328
25248
  state: {
25329
25249
  isSubmitting
25330
25250
  }
25331
- } = useContext(store$3);
25251
+ } = useContext(store$2);
25332
25252
  const {
25333
25253
  t
25334
25254
  } = useTranslation("userEdit");
@@ -25351,7 +25271,7 @@ const ProfilePicChangeWrapper = () => {
25351
25271
  state: {
25352
25272
  imageSrc
25353
25273
  }
25354
- } = useContext(store$3);
25274
+ } = useContext(store$2);
25355
25275
  const {
25356
25276
  t
25357
25277
  } = useTranslation("userEdit");
@@ -25413,17 +25333,17 @@ function ProfilePicChangeModal({
25413
25333
  }
25414
25334
  ProfilePicChangeModal.viewId = "profile-picture";
25415
25335
 
25416
- const initialState$2 = {
25336
+ const initialState$1 = {
25417
25337
  isSubmitting: false,
25418
25338
  alert: {
25419
25339
  type: "error",
25420
25340
  content: ""
25421
25341
  }
25422
25342
  };
25423
- const store$2 = /*#__PURE__*/createContext(initialState$2);
25343
+ const store$1 = /*#__PURE__*/createContext(initialState$1);
25424
25344
  const {
25425
- Provider: Provider$2
25426
- } = store$2;
25345
+ Provider: Provider$1
25346
+ } = store$1;
25427
25347
 
25428
25348
  const EmailVerifyContainer = ({
25429
25349
  style,
@@ -25486,21 +25406,21 @@ const EmailVerifyContainer = ({
25486
25406
  default:
25487
25407
  return state;
25488
25408
  }
25489
- }, initialState$2);
25409
+ }, initialState$1);
25490
25410
  return /*#__PURE__*/React__default.createElement("div", {
25491
25411
  style: { ...style
25492
25412
  },
25493
25413
  className: `pelcro-container pelcro-email-verify-container ${className}`
25494
- }, /*#__PURE__*/React__default.createElement(Provider$2, {
25414
+ }, /*#__PURE__*/React__default.createElement(Provider$1, {
25495
25415
  value: {
25496
25416
  state,
25497
25417
  dispatch
25498
25418
  }
25499
25419
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
25500
- store: store$2,
25420
+ store: store$1,
25501
25421
  key: i
25502
25422
  })) : /*#__PURE__*/React__default.cloneElement(children, {
25503
- store: store$2
25423
+ store: store$1
25504
25424
  })));
25505
25425
  };
25506
25426
 
@@ -25514,7 +25434,7 @@ const EmailVerifyResendButton = ({
25514
25434
  state: {
25515
25435
  isSubmitting
25516
25436
  }
25517
- } = useContext(store$2);
25437
+ } = useContext(store$1);
25518
25438
  const {
25519
25439
  t
25520
25440
  } = useTranslation("verifyEmail");
@@ -25529,16 +25449,16 @@ const EmailVerifyResendButton = ({
25529
25449
  }, otherProps), name !== null && name !== void 0 ? name : t("labels.resend"));
25530
25450
  };
25531
25451
 
25532
- var _path$1, _path2;
25452
+ var _path, _path2;
25533
25453
 
25534
- function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
25454
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25535
25455
 
25536
25456
  function SvgEmailVerify(props) {
25537
- return /*#__PURE__*/React.createElement("svg", _extends$1({
25457
+ return /*#__PURE__*/React.createElement("svg", _extends({
25538
25458
  className: "plc-w-6 plc-h-6",
25539
25459
  viewBox: "0 0 700 700",
25540
25460
  xmlns: "http://www.w3.org/2000/svg"
25541
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
25461
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
25542
25462
  d: "M583.01 231.93a15.008 15.008 0 00-.887-3.875c-.562-1.254-1.129-2.508-1.695-3.762a14.686 14.686 0 00-1.898-1.789c-.438-.437-.653-1.027-1.153-1.414l-56.266-44.164v-52.484a15.555 15.555 0 00-15.554-15.555H434.56l-74.945-58.895a15.547 15.547 0 00-19.227 0l-74.945 58.895h-70.996a15.555 15.555 0 00-15.555 15.555v52.484l-56.266 44.16c-.496.39-.715.996-1.152 1.43v.004a13.37 13.37 0 00-1.898 1.773c-.22.426-.414.86-.59 1.305a14.158 14.158 0 00-1.106 2.457 15.009 15.009 0 00-.886 3.875c0 .48-.329.918-.329 1.398l.004 264.45a15.555 15.555 0 0015.555 15.555h435.55a15.555 15.555 0 0015.555-15.555v-264.45c0-.48-.278-.918-.325-1.398zm-41.176.809l-20.723 14.809v-31.11zm-191.83-150.73l34.223 26.883h-68.445zm-140 57.992h280v124.45c.07 1.593.383 3.168.934 4.664l-140.93 100.66-140.46-100.33c.214-.77.37-1.555.464-2.348zm-31.109 107.55l-20.719-14.81 20.719-16.27zm-31.113 234.67V263.56l193.18 137.99a15.562 15.562 0 0018.078 0l193.18-137.99v218.66z"
25543
25463
  })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
25544
25464
  d: "M324.33 291.81a15.56 15.56 0 0020.582-.297l85.555-77.777a15.56 15.56 0 00-20.938-23.023l-75.398 68.539-44.023-37.723a15.54 15.54 0 00-11.46-4.106 15.553 15.553 0 00-8.758 27.718z"
@@ -25642,11 +25562,11 @@ const invoicePaymentSubmitButton = props => {
25642
25562
  return /*#__PURE__*/React__default.createElement(SubmitPaymentMethod, props);
25643
25563
  };
25644
25564
 
25645
- const initialState$1 = {};
25646
- const store$1 = /*#__PURE__*/createContext(initialState$1);
25565
+ const initialState = {};
25566
+ const store = /*#__PURE__*/createContext(initialState);
25647
25567
  const {
25648
- Provider: Provider$1
25649
- } = store$1;
25568
+ Provider
25569
+ } = store;
25650
25570
 
25651
25571
  const InvoiceDetailsContainer = ({
25652
25572
  style,
@@ -25667,21 +25587,21 @@ const InvoiceDetailsContainer = ({
25667
25587
  default:
25668
25588
  return state;
25669
25589
  }
25670
- }, initialState$1);
25590
+ }, initialState);
25671
25591
  return /*#__PURE__*/React__default.createElement("div", {
25672
25592
  style: { ...style
25673
25593
  },
25674
25594
  className: `pelcro-container pelcro-invoice-details-container ${className}`
25675
- }, /*#__PURE__*/React__default.createElement(Provider$1, {
25595
+ }, /*#__PURE__*/React__default.createElement(Provider, {
25676
25596
  value: {
25677
25597
  state,
25678
25598
  dispatch
25679
25599
  }
25680
25600
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
25681
- store: store$1,
25601
+ store,
25682
25602
  key: i
25683
25603
  })) : /*#__PURE__*/React__default.cloneElement(children, {
25684
- store: store$1
25604
+ store
25685
25605
  })));
25686
25606
  };
25687
25607
 
@@ -25713,7 +25633,7 @@ const InvoiceDetailsPayButton = ({
25713
25633
  }) => {
25714
25634
  const {
25715
25635
  dispatch
25716
- } = useContext(store$1);
25636
+ } = useContext(store);
25717
25637
  const {
25718
25638
  t
25719
25639
  } = useTranslation("invoiceDetails");
@@ -25820,230 +25740,4 @@ const InvoiceDetailsModal = ({
25820
25740
  };
25821
25741
  InvoiceDetailsModal.viewId = "invoice-details";
25822
25742
 
25823
- const initialState = {
25824
- selectedOption: ""
25825
- };
25826
- const store = /*#__PURE__*/createContext(initialState);
25827
- const {
25828
- Provider
25829
- } = store;
25830
-
25831
- const SubscriptionOptionsContainer = ({
25832
- style,
25833
- className = "",
25834
- onRenewSubSuccess = () => {},
25835
- onNewSubSuccess = () => {},
25836
- children,
25837
- ...props
25838
- }) => {
25839
- const submit = ({
25840
- selectedOption
25841
- }, dispatch) => {
25842
- if (selectedOption === "renew") return onRenewSubSuccess();
25843
- if (selectedOption === "new") return onNewSubSuccess();
25844
- };
25845
-
25846
- const [state, dispatch] = useReducerWithSideEffects((state, action) => {
25847
- switch (action.type) {
25848
- case SWITCH_TO_NEW:
25849
- return lib_7({ ...state,
25850
- selectedOption: "new"
25851
- });
25852
-
25853
- case SWITCH_TO_RENEW:
25854
- return lib_7({ ...state,
25855
- selectedOption: "renew"
25856
- });
25857
-
25858
- case HANDLE_SUBMIT:
25859
- return lib_4((state, dispatch) => submit(state));
25860
-
25861
- default:
25862
- return state;
25863
- }
25864
- }, initialState);
25865
- return /*#__PURE__*/React__default.createElement("div", {
25866
- style: { ...style
25867
- },
25868
- className: `pelcro-container pelcro-subscription-options-container ${className}`
25869
- }, /*#__PURE__*/React__default.createElement(Provider, {
25870
- value: {
25871
- state,
25872
- dispatch
25873
- }
25874
- }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
25875
- store,
25876
- key: i
25877
- })) : /*#__PURE__*/React__default.cloneElement(children, {
25878
- store
25879
- })));
25880
- };
25881
-
25882
- var _path;
25883
-
25884
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25885
-
25886
- function SvgPlusCircle(props) {
25887
- return /*#__PURE__*/React.createElement("svg", _extends({
25888
- xmlns: "http://www.w3.org/2000/svg",
25889
- className: "plc-h-6 plc-w-6",
25890
- fill: "none",
25891
- viewBox: "0 0 24 24",
25892
- stroke: "currentColor",
25893
- strokeWidth: 2
25894
- }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
25895
- strokeLinecap: "round",
25896
- strokeLinejoin: "round",
25897
- d: "M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"
25898
- })));
25899
- }
25900
-
25901
- const SubscriptionOptionsNewButton = ({
25902
- name,
25903
- onClick,
25904
- ...otherProps
25905
- }) => {
25906
- const {
25907
- dispatch,
25908
- state: {
25909
- selectedOption
25910
- }
25911
- } = useContext(store);
25912
- const {
25913
- t
25914
- } = useTranslation("subscriptionOptions");
25915
- const isChecked = selectedOption === "new";
25916
- return /*#__PURE__*/React__default.createElement(Radio, Object.assign({
25917
- className: "plc-hidden pelcro-new-sub-option",
25918
- labelClassName: `plc-flex plc-flex-col plc-items-center plc-justify-center plc-text-lg plc-font-semibold plc-ml-0 plc-w-52 plc-h-52 plc-text-black plc-p-2 hover:plc-bg-gray-200 pelcro-new-sub-option-label plc-border-2 plc-text-center ${isChecked ? "plc-border-black" : "plc-border-gray-300"}`,
25919
- id: "pelcro-new-sub-option",
25920
- name: "option",
25921
- onChange: () => {
25922
- dispatch({
25923
- type: SWITCH_TO_NEW
25924
- });
25925
- onClick === null || onClick === void 0 ? void 0 : onClick();
25926
- },
25927
- checked: isChecked
25928
- }, otherProps), name !== null && name !== void 0 ? name : t("addNew"), /*#__PURE__*/React__default.createElement(SvgPlusCircle, {
25929
- className: "plc-w-full plc-h-full plc-mr-0"
25930
- }));
25931
- };
25932
-
25933
- const SubscriptionOptionsRenewButton = ({
25934
- name,
25935
- onClick,
25936
- ...otherProps
25937
- }) => {
25938
- const {
25939
- dispatch,
25940
- state: {
25941
- selectedOption
25942
- }
25943
- } = useContext(store);
25944
- const {
25945
- t
25946
- } = useTranslation("subscriptionOptions");
25947
- const isChecked = selectedOption === "renew";
25948
- return /*#__PURE__*/React__default.createElement(Radio, Object.assign({
25949
- className: "plc-hidden pelcro-renew-sub-option",
25950
- labelClassName: `plc-flex plc-flex-col plc-items-center plc-justify-center plc-text-lg plc-font-semibold plc-ml-0 plc-w-52 plc-h-52 plc-text-black plc-p-2 hover:plc-bg-gray-200 pelcro-renew-sub-option-label plc-border-2 plc-text-center ${isChecked ? "plc-border-black" : "plc-border-gray-300"}`,
25951
- id: "pelcro-renew-sub-option",
25952
- name: "option",
25953
- onChange: () => {
25954
- dispatch({
25955
- type: SWITCH_TO_RENEW
25956
- });
25957
- onClick === null || onClick === void 0 ? void 0 : onClick();
25958
- },
25959
- checked: isChecked
25960
- }, otherProps), name !== null && name !== void 0 ? name : t("renew"), /*#__PURE__*/React__default.createElement(SvgRefresh, {
25961
- className: "plc-w-full plc-h-full plc-mr-0"
25962
- }));
25963
- };
25964
-
25965
- const SubscriptionOptionsSubmit = ({
25966
- name,
25967
- onClick,
25968
- ...otherProps
25969
- }) => {
25970
- const {
25971
- dispatch,
25972
- state: {
25973
- selectedOption
25974
- }
25975
- } = useContext(store);
25976
- const {
25977
- t
25978
- } = useTranslation("subscriptionOptions");
25979
- return /*#__PURE__*/React__default.createElement(Button, Object.assign({
25980
- onClick: () => {
25981
- dispatch({
25982
- type: HANDLE_SUBMIT
25983
- });
25984
- onClick === null || onClick === void 0 ? void 0 : onClick();
25985
- },
25986
- disabled: !selectedOption
25987
- }, otherProps), name !== null && name !== void 0 ? name : t("next"));
25988
- };
25989
-
25990
- const SubscriptionOptionsView = props => {
25991
- const {
25992
- t
25993
- } = useTranslation("subscriptionOptions");
25994
- return /*#__PURE__*/React__default.createElement("div", {
25995
- id: "pelcro-subscription-options-view"
25996
- }, /*#__PURE__*/React__default.createElement("div", {
25997
- className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
25998
- }, /*#__PURE__*/React__default.createElement("h4", {
25999
- className: "plc-text-2xl plc-font-semibold"
26000
- }, t("title")), /*#__PURE__*/React__default.createElement("p", null, t("subtitle"))), /*#__PURE__*/React__default.createElement("form", {
26001
- action: "javascript:void(0);",
26002
- className: "plc-mt-2 pelcro-form"
26003
- }, /*#__PURE__*/React__default.createElement(SubscriptionOptionsContainer, props, /*#__PURE__*/React__default.createElement("div", {
26004
- className: "plc-flex plc-justify-between plc-items-center"
26005
- }, /*#__PURE__*/React__default.createElement(SubscriptionOptionsRenewButton, null), /*#__PURE__*/React__default.createElement(SubscriptionOptionsNewButton, null)), /*#__PURE__*/React__default.createElement(SubscriptionOptionsSubmit, {
26006
- role: "submit",
26007
- className: "plc-mt-4 plc-w-full",
26008
- name: t("next"),
26009
- id: "pelcro-submit"
26010
- }))));
26011
- };
26012
-
26013
- const SubscriptionOptionsModal = ({
26014
- onDisplay,
26015
- onClose,
26016
- ...otherProps
26017
- }) => {
26018
- const {
26019
- switchView,
26020
- setProductsList
26021
- } = usePelcro();
26022
-
26023
- const onRenewSubSuccess = () => {
26024
- var _otherProps$onRenewSu;
26025
-
26026
- (_otherProps$onRenewSu = otherProps.onRenewSubSuccess) === null || _otherProps$onRenewSu === void 0 ? void 0 : _otherProps$onRenewSu.call(otherProps);
26027
- setProductsList(getRenewableProducts());
26028
- switchView("_plan-select-renew");
26029
- };
26030
-
26031
- const onNewSubSuccess = () => {
26032
- var _otherProps$onNewSubS;
26033
-
26034
- (_otherProps$onNewSubS = otherProps.onNewSubSuccess) === null || _otherProps$onNewSubS === void 0 ? void 0 : _otherProps$onNewSubS.call(otherProps);
26035
- switchView("plan-select");
26036
- };
26037
-
26038
- return /*#__PURE__*/React__default.createElement(Modal, {
26039
- onDisplay: onDisplay,
26040
- onClose: onClose,
26041
- id: "pelcro-subscription-options-modal"
26042
- }, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(SubscriptionOptionsView, Object.assign({}, otherProps, {
26043
- onNewSubSuccess: onNewSubSuccess,
26044
- onRenewSubSuccess: onRenewSubSuccess
26045
- }))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
26046
- };
26047
- SubscriptionOptionsModal.viewId = "subscription-options";
26048
-
26049
- export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, 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, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, 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, 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, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionOptionsContainer, SubscriptionOptionsModal, SubscriptionOptionsNewButton, SubscriptionOptionsRenewButton, SubscriptionOptionsSubmit, SubscriptionOptionsView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };
25743
+ export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, 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, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, 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, 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, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };