@pelcro/react-pelcro-js 3.2.0-beta.3 → 3.2.0-beta.4

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.cjs.js CHANGED
@@ -3461,9 +3461,9 @@ var paymentMethod_fr = {
3461
3461
  select: select
3462
3462
  };
3463
3463
 
3464
- var title$f = "Enter your email to subscribe to our newsletter";
3464
+ var title$h = "Enter your email to subscribe to our newsletter";
3465
3465
  var updateTitle$1 = "Update newsletter selections";
3466
- var subtitle$7 = "We may use your email for other marketing communication";
3466
+ var subtitle$9 = "We may use your email for other marketing communication";
3467
3467
  var labels$p = {
3468
3468
  submit: "Submit",
3469
3469
  firstName: "First name",
@@ -3480,16 +3480,16 @@ var messages$r = {
3480
3480
  here: "here"
3481
3481
  };
3482
3482
  var newsletter_en = {
3483
- title: title$f,
3483
+ title: title$h,
3484
3484
  updateTitle: updateTitle$1,
3485
- subtitle: subtitle$7,
3485
+ subtitle: subtitle$9,
3486
3486
  labels: labels$p,
3487
3487
  messages: messages$r
3488
3488
  };
3489
3489
 
3490
- var title$e = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3490
+ var title$g = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3491
3491
  var updateTitle = "Mettre à jour son choix d'infolettres";
3492
- var subtitle$6 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3492
+ var subtitle$8 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3493
3493
  var labels$o = {
3494
3494
  submit: "Lire l’article !",
3495
3495
  firstName: "Prénom",
@@ -3506,9 +3506,9 @@ var messages$q = {
3506
3506
  here: "ici"
3507
3507
  };
3508
3508
  var newsletter_fr = {
3509
- title: title$e,
3509
+ title: title$g,
3510
3510
  updateTitle: updateTitle,
3511
- subtitle: subtitle$6,
3511
+ subtitle: subtitle$8,
3512
3512
  labels: labels$o,
3513
3513
  messages: messages$q
3514
3514
  };
@@ -3765,8 +3765,8 @@ var login_fr = {
3765
3765
  errors: errors$4
3766
3766
  };
3767
3767
 
3768
- var title$d = "Create an account";
3769
- var subtitle$5 = "Enter your email and password below";
3768
+ var title$f = "Create an account";
3769
+ var subtitle$7 = "Enter your email and password below";
3770
3770
  var labels$h = {
3771
3771
  signUpFacebook: "Sign up with Facebook",
3772
3772
  signUpGoogle: "Sign up with Google",
@@ -3851,8 +3851,8 @@ var redeem$1 = {
3851
3851
  }
3852
3852
  };
3853
3853
  var register_en = {
3854
- title: title$d,
3855
- subtitle: subtitle$5,
3854
+ title: title$f,
3855
+ subtitle: subtitle$7,
3856
3856
  labels: labels$h,
3857
3857
  messages: messages$h,
3858
3858
  errors: errors$3,
@@ -3860,8 +3860,8 @@ var register_en = {
3860
3860
  redeem: redeem$1
3861
3861
  };
3862
3862
 
3863
- var title$c = "Créer un compte";
3864
- var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
3863
+ var title$e = "Créer un compte";
3864
+ var subtitle$6 = "Entrez votre courriel et votre mot de passe ci-dessous";
3865
3865
  var labels$g = {
3866
3866
  signUpFacebook: "Inscrivez-vous avec Facebook",
3867
3867
  signUpGoogle: "Inscrivez-vous avec Google",
@@ -3947,8 +3947,8 @@ var redeem = {
3947
3947
  }
3948
3948
  };
3949
3949
  var register_fr = {
3950
- title: title$c,
3951
- subtitle: subtitle$4,
3950
+ title: title$e,
3951
+ subtitle: subtitle$6,
3952
3952
  labels: labels$g,
3953
3953
  messages: messages$g,
3954
3954
  errors: errors$2,
@@ -4008,7 +4008,7 @@ var userEdit_fr = {
4008
4008
  messages: messages$e
4009
4009
  };
4010
4010
 
4011
- var title$b = "Enter your shipping address";
4011
+ var title$d = "Enter your shipping address";
4012
4012
  var selectAddressTitle$1 = "Please select an address";
4013
4013
  var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
4014
4014
  var labels$d = {
@@ -4031,7 +4031,7 @@ var messages$d = {
4031
4031
  subRedeemed: "Your subscription has been redeemed."
4032
4032
  };
4033
4033
  var address_en = {
4034
- title: title$b,
4034
+ title: title$d,
4035
4035
  selectAddressTitle: selectAddressTitle$1,
4036
4036
  selectAddressSubtitle: selectAddressSubtitle$1,
4037
4037
  labels: labels$d,
@@ -4039,7 +4039,7 @@ var address_en = {
4039
4039
  messages: messages$d
4040
4040
  };
4041
4041
 
4042
- var title$a = "Entrez votre adresse de livraison";
4042
+ var title$c = "Entrez votre adresse de livraison";
4043
4043
  var selectAddressTitle = "Veuillez sélectionner une adresse";
4044
4044
  var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
4045
4045
  var labels$c = {
@@ -4062,7 +4062,7 @@ var messages$c = {
4062
4062
  subRedeemed: "Votre abonnement a bien été activé."
4063
4063
  };
4064
4064
  var address_fr = {
4065
- title: title$a,
4065
+ title: title$c,
4066
4066
  selectAddressTitle: selectAddressTitle,
4067
4067
  selectAddressSubtitle: selectAddressSubtitle,
4068
4068
  labels: labels$c,
@@ -4070,8 +4070,8 @@ var address_fr = {
4070
4070
  messages: messages$c
4071
4071
  };
4072
4072
 
4073
- var title$9 = "Reset your password";
4074
- var subtitle$3 = "Enter a new password below";
4073
+ var title$b = "Reset your password";
4074
+ var subtitle$5 = "Enter a new password below";
4075
4075
  var email$3 = "Email";
4076
4076
  var password$3 = "Password";
4077
4077
  var confirmPassword$1 = "Confirm password";
@@ -4079,8 +4079,8 @@ var submit$5 = "Submit";
4079
4079
  var required$5 = "Required";
4080
4080
  var passwordUpdated$1 = "Password has been updated, please login with the new password";
4081
4081
  var passwordReset_en = {
4082
- title: title$9,
4083
- subtitle: subtitle$3,
4082
+ title: title$b,
4083
+ subtitle: subtitle$5,
4084
4084
  email: email$3,
4085
4085
  password: password$3,
4086
4086
  confirmPassword: confirmPassword$1,
@@ -4089,8 +4089,8 @@ var passwordReset_en = {
4089
4089
  passwordUpdated: passwordUpdated$1
4090
4090
  };
4091
4091
 
4092
- var title$8 = "Réinitialiser votre mot de passe";
4093
- var subtitle$2 = "Entrez un nouveau mot de passe ci-dessous";
4092
+ var title$a = "Réinitialiser votre mot de passe";
4093
+ var subtitle$4 = "Entrez un nouveau mot de passe ci-dessous";
4094
4094
  var email$2 = "Adresse courriel";
4095
4095
  var password$2 = "Mot de passe";
4096
4096
  var confirmPassword = "Confirmer le mot de passe";
@@ -4098,8 +4098,8 @@ var submit$4 = "Soumettre";
4098
4098
  var required$4 = "Champs obligatoires";
4099
4099
  var passwordUpdated = "Votre mot de passe a été mis à jour, veuillez vous connecter avec celui-ci";
4100
4100
  var passwordReset_fr = {
4101
- title: title$8,
4102
- subtitle: subtitle$2,
4101
+ title: title$a,
4102
+ subtitle: subtitle$4,
4103
4103
  email: email$2,
4104
4104
  password: password$2,
4105
4105
  confirmPassword: confirmPassword,
@@ -4108,7 +4108,7 @@ var passwordReset_fr = {
4108
4108
  passwordUpdated: passwordUpdated
4109
4109
  };
4110
4110
 
4111
- var title$7 = "Forgot your password?";
4111
+ var title$9 = "Forgot your password?";
4112
4112
  var email$1 = "Email";
4113
4113
  var password$1 = "Password";
4114
4114
  var submit$3 = "Submit";
@@ -4119,7 +4119,7 @@ var messages$b = {
4119
4119
  loginHere: "login here."
4120
4120
  };
4121
4121
  var passwordForgot_en = {
4122
- title: title$7,
4122
+ title: title$9,
4123
4123
  email: email$1,
4124
4124
  password: password$1,
4125
4125
  submit: submit$3,
@@ -4128,7 +4128,7 @@ var passwordForgot_en = {
4128
4128
  messages: messages$b
4129
4129
  };
4130
4130
 
4131
- var title$6 = "Mot de passe oublié ?";
4131
+ var title$8 = "Mot de passe oublié ?";
4132
4132
  var email = "Courriel";
4133
4133
  var password = "Mot de passe";
4134
4134
  var submit$2 = "Soumettre";
@@ -4139,7 +4139,7 @@ var messages$a = {
4139
4139
  loginHere: "Connectez-vous ici"
4140
4140
  };
4141
4141
  var passwordForgot_fr = {
4142
- title: title$6,
4142
+ title: title$8,
4143
4143
  email: email,
4144
4144
  password: password,
4145
4145
  submit: submit$2,
@@ -4148,7 +4148,7 @@ var passwordForgot_fr = {
4148
4148
  messages: messages$a
4149
4149
  };
4150
4150
 
4151
- var title$5 = "Change your password";
4151
+ var title$7 = "Change your password";
4152
4152
  var currentPassword$1 = "Current password";
4153
4153
  var newPassword$1 = "New password";
4154
4154
  var confirmNewPassword$1 = "Confirm new password";
@@ -4158,7 +4158,7 @@ var passwordChanged$1 = "Password has been changed, please login with the new pa
4158
4158
  var passwordsNotMatching$1 = "Passwords don't match";
4159
4159
  var weakPassword$1 = "Your password must contain at least 6 characters";
4160
4160
  var passwordChange_en = {
4161
- title: title$5,
4161
+ title: title$7,
4162
4162
  currentPassword: currentPassword$1,
4163
4163
  newPassword: newPassword$1,
4164
4164
  confirmNewPassword: confirmNewPassword$1,
@@ -4169,7 +4169,7 @@ var passwordChange_en = {
4169
4169
  weakPassword: weakPassword$1
4170
4170
  };
4171
4171
 
4172
- var title$4 = "Changez votre mot de passe";
4172
+ var title$6 = "Changez votre mot de passe";
4173
4173
  var currentPassword = "Mot de passe actuel";
4174
4174
  var newPassword = "Nouveau mot de passe";
4175
4175
  var confirmNewPassword = "Confirmer le nouveau mot de passe";
@@ -4179,7 +4179,7 @@ var passwordChanged = "Le mot de passe a été modifié, veuillez vous connecter
4179
4179
  var passwordsNotMatching = "Les mots de passe ne correspondent pas";
4180
4180
  var weakPassword = "Votre mot de passe doit contenir au moins 6";
4181
4181
  var passwordChange_fr = {
4182
- title: title$4,
4182
+ title: title$6,
4183
4183
  currentPassword: currentPassword,
4184
4184
  newPassword: newPassword,
4185
4185
  confirmNewPassword: confirmNewPassword,
@@ -4190,8 +4190,8 @@ var passwordChange_fr = {
4190
4190
  weakPassword: weakPassword
4191
4191
  };
4192
4192
 
4193
- var title$3 = "Votre panier";
4194
- var subtitle$1 = "Terminez votre achat ci-dessous";
4193
+ var title$5 = "Votre panier";
4194
+ var subtitle$3 = "Terminez votre achat ci-dessous";
4195
4195
  var name$1 = "Produit";
4196
4196
  var quantity$1 = "Quantité";
4197
4197
  var price$1 = "Prix";
@@ -4202,8 +4202,8 @@ var confirm$3 = "Passer à la caisse";
4202
4202
  var empty$1 = "Votre panier est vide.";
4203
4203
  var removeAll$1 = "Vider";
4204
4204
  var cart_fr = {
4205
- title: title$3,
4206
- subtitle: subtitle$1,
4205
+ title: title$5,
4206
+ subtitle: subtitle$3,
4207
4207
  name: name$1,
4208
4208
  quantity: quantity$1,
4209
4209
  price: price$1,
@@ -4215,8 +4215,8 @@ var cart_fr = {
4215
4215
  removeAll: removeAll$1
4216
4216
  };
4217
4217
 
4218
- var title$2 = "Your shopping cart";
4219
- var subtitle = "Comple your purchase below";
4218
+ var title$4 = "Your shopping cart";
4219
+ var subtitle$2 = "Comple your purchase below";
4220
4220
  var name = "Name";
4221
4221
  var quantity = "Quantity";
4222
4222
  var price = "Price";
@@ -4227,8 +4227,8 @@ var confirm$2 = "Checkout";
4227
4227
  var empty = "Your cart is empty.";
4228
4228
  var removeAll = "Remove all";
4229
4229
  var cart_en = {
4230
- title: title$2,
4231
- subtitle: subtitle,
4230
+ title: title$4,
4231
+ subtitle: subtitle$2,
4232
4232
  name: name,
4233
4233
  quantity: quantity,
4234
4234
  price: price,
@@ -4666,7 +4666,7 @@ var verifyEmail_fr = {
4666
4666
  messages: messages
4667
4667
  };
4668
4668
 
4669
- var title$1 = "Invoice details";
4669
+ var title$3 = "Invoice details";
4670
4670
  var labels$1 = {
4671
4671
  summary: "Summary",
4672
4672
  total: "Total",
@@ -4679,12 +4679,12 @@ var buttons$1 = {
4679
4679
  pay: "Pay now"
4680
4680
  };
4681
4681
  var invoiceDetails_en = {
4682
- title: title$1,
4682
+ title: title$3,
4683
4683
  labels: labels$1,
4684
4684
  buttons: buttons$1
4685
4685
  };
4686
4686
 
4687
- var title = "Invoice details";
4687
+ var title$2 = "Invoice details";
4688
4688
  var labels = {
4689
4689
  summary: "Summary",
4690
4690
  total: "Total",
@@ -4697,11 +4697,37 @@ var buttons = {
4697
4697
  pay: "Pay now"
4698
4698
  };
4699
4699
  var invoiceDetails_fr = {
4700
- title: title,
4700
+ title: title$2,
4701
4701
  labels: labels,
4702
4702
  buttons: buttons
4703
4703
  };
4704
4704
 
4705
+ var title$1 = "Renewal options";
4706
+ var subtitle$1 = "Select one of the options below to continue";
4707
+ var next$1 = "Next";
4708
+ var addNew$1 = "Add Another Subscription";
4709
+ var renew$1 = "Renew Existing Subscription";
4710
+ var subscriptionOptions_en = {
4711
+ title: title$1,
4712
+ subtitle: subtitle$1,
4713
+ next: next$1,
4714
+ addNew: addNew$1,
4715
+ renew: renew$1
4716
+ };
4717
+
4718
+ var title = "Renewal options";
4719
+ var subtitle = "Select one of the options below to continue";
4720
+ var next = "Next";
4721
+ var addNew = "Add Another Subscription";
4722
+ var renew = "Renew Existing Subscription";
4723
+ var subscriptionOptions_fr = {
4724
+ title: title,
4725
+ subtitle: subtitle,
4726
+ next: next,
4727
+ addNew: addNew,
4728
+ renew: renew
4729
+ };
4730
+
4705
4731
  function create$1(createState) {
4706
4732
  let state;
4707
4733
  const listeners = new Set();
@@ -6051,7 +6077,7 @@ class PelcroActions {
6051
6077
  view,
6052
6078
  cartItems,
6053
6079
  ...otherStateFields
6054
- } = initialState$i;
6080
+ } = initialState$j;
6055
6081
  this.set(otherStateFields);
6056
6082
  });
6057
6083
 
@@ -6075,6 +6101,16 @@ class PelcroActions {
6075
6101
  });
6076
6102
  }
6077
6103
 
6104
+ if (view === "subscription-options") {
6105
+ const noRenewableProducts = getRenewableProducts().length === 0;
6106
+
6107
+ if (noRenewableProducts) {
6108
+ return this.set({
6109
+ view: "plan-select"
6110
+ });
6111
+ }
6112
+ }
6113
+
6078
6114
  this.set({
6079
6115
  view
6080
6116
  });
@@ -6149,6 +6185,26 @@ class PelcroActions {
6149
6185
  }
6150
6186
  });
6151
6187
 
6188
+ _defineProperty$3(this, "setProductsList", products => {
6189
+ if (!Array.isArray(products)) {
6190
+ return console.error(`setProductsList expects an array of products as an argument, got an argument of type ${typeof products} instead`);
6191
+ }
6192
+
6193
+ const allowedProducts = window.Pelcro.product.list();
6194
+ const validProducts = products.filter(product => {
6195
+ 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));
6196
+
6197
+ if (!isValidProduct) {
6198
+ 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);
6199
+ }
6200
+
6201
+ return isValidProduct;
6202
+ });
6203
+ this.set({
6204
+ productsList: validProducts
6205
+ });
6206
+ });
6207
+
6152
6208
  _defineProperty$3(this, "setProduct", id => {
6153
6209
  const product = window.Pelcro.product.getById(id);
6154
6210
  if (!product) return console.error("invalid product id");
@@ -6370,10 +6426,12 @@ class PelcroCallbacks {
6370
6426
 
6371
6427
  }
6372
6428
 
6373
- const initialState$i = {
6429
+ var _window$Pelcro$produc, _window$Pelcro;
6430
+ const initialState$j = {
6374
6431
  // View
6375
6432
  view: null,
6376
6433
  // Plans
6434
+ 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 : [],
6377
6435
  product: null,
6378
6436
  plan: null,
6379
6437
  isGift: false,
@@ -6400,7 +6458,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
6400
6458
  return {
6401
6459
  // Store setter
6402
6460
  set,
6403
- ...initialState$i,
6461
+ ...initialState$j,
6404
6462
  // State actions
6405
6463
  ...actions,
6406
6464
  // Callbacks
@@ -6755,6 +6813,28 @@ function userMustVerifyEmail() {
6755
6813
  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;
6756
6814
  return window.Pelcro.user.isAuthenticated() && isEmailVerificationEnabled && !isUserEmailVerified;
6757
6815
  }
6816
+ function getRenewableProducts() {
6817
+ const renewableSubs = window.Pelcro.subscription.list().filter(sub => sub.status === "active" && sub.cancel_at_period_end === 1);
6818
+ const renewableProductsIds = [...new Set(renewableSubs.map(sub => sub.plan.product.id))];
6819
+ const renewablePlansIds = [...new Set(renewableSubs.map(sub => sub.plan.id))];
6820
+ const {
6821
+ productsList
6822
+ } = usePelcro.getStore();
6823
+ return productsList.map(product => {
6824
+ if (renewableProductsIds.includes(product.id)) {
6825
+ const renewablePlans = getRenewablePlansOnly(product);
6826
+ return { ...product,
6827
+ plans: renewablePlans
6828
+ };
6829
+ }
6830
+ }).filter(product => product);
6831
+
6832
+ function getRenewablePlansOnly(product) {
6833
+ var _product$plans$filter, _product$plans;
6834
+
6835
+ 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 : [];
6836
+ }
6837
+ }
6758
6838
 
6759
6839
  const resources = {
6760
6840
  en: {
@@ -6779,7 +6859,8 @@ const resources = {
6779
6859
  dashboard: dashboard_en,
6780
6860
  select: select_en,
6781
6861
  notification: notification_en,
6782
- invoiceDetails: invoiceDetails_en
6862
+ invoiceDetails: invoiceDetails_en,
6863
+ subscriptionOptions: subscriptionOptions_en
6783
6864
  },
6784
6865
  fr: {
6785
6866
  common: common_fr,
@@ -6803,7 +6884,8 @@ const resources = {
6803
6884
  dashboard: dashboard_fr,
6804
6885
  select: select_fr,
6805
6886
  notification: notification_fr,
6806
- invoiceDetails: invoiceDetails_fr
6887
+ invoiceDetails: invoiceDetails_fr,
6888
+ subscriptionOptions: subscriptionOptions_fr
6807
6889
  }
6808
6890
  }; // set UI language to the page language or default to the language in site settings
6809
6891
 
@@ -7094,8 +7176,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
7094
7176
 
7095
7177
  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}}
7096
7178
 
7097
- function _extends$z() {
7098
- _extends$z = Object.assign || function (target) {
7179
+ function _extends$A() {
7180
+ _extends$A = Object.assign || function (target) {
7099
7181
  for (var i = 1; i < arguments.length; i++) {
7100
7182
  var source = arguments[i];
7101
7183
 
@@ -7109,7 +7191,7 @@ function _extends$z() {
7109
7191
  return target;
7110
7192
  };
7111
7193
 
7112
- return _extends$z.apply(this, arguments);
7194
+ return _extends$A.apply(this, arguments);
7113
7195
  }
7114
7196
 
7115
7197
  function _taggedTemplateLiteralLoose(strings, raw) {
@@ -7199,7 +7281,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
7199
7281
  var reducer = function reducer(state, action) {
7200
7282
  switch (action.type) {
7201
7283
  case ActionType.ADD_TOAST:
7202
- return _extends$z({}, state, {
7284
+ return _extends$A({}, state, {
7203
7285
  toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
7204
7286
  });
7205
7287
 
@@ -7209,9 +7291,9 @@ var reducer = function reducer(state, action) {
7209
7291
  clearFromRemoveQueue(action.toast.id);
7210
7292
  }
7211
7293
 
7212
- return _extends$z({}, state, {
7294
+ return _extends$A({}, state, {
7213
7295
  toasts: state.toasts.map(function (t) {
7214
- return t.id === action.toast.id ? _extends$z({}, t, action.toast) : t;
7296
+ return t.id === action.toast.id ? _extends$A({}, t, action.toast) : t;
7215
7297
  })
7216
7298
  });
7217
7299
 
@@ -7238,9 +7320,9 @@ var reducer = function reducer(state, action) {
7238
7320
  });
7239
7321
  }
7240
7322
 
7241
- return _extends$z({}, state, {
7323
+ return _extends$A({}, state, {
7242
7324
  toasts: state.toasts.map(function (t) {
7243
- return t.id === toastId || toastId === undefined ? _extends$z({}, t, {
7325
+ return t.id === toastId || toastId === undefined ? _extends$A({}, t, {
7244
7326
  visible: false
7245
7327
  }) : t;
7246
7328
  })
@@ -7248,28 +7330,28 @@ var reducer = function reducer(state, action) {
7248
7330
 
7249
7331
  case ActionType.REMOVE_TOAST:
7250
7332
  if (action.toastId === undefined) {
7251
- return _extends$z({}, state, {
7333
+ return _extends$A({}, state, {
7252
7334
  toasts: []
7253
7335
  });
7254
7336
  }
7255
7337
 
7256
- return _extends$z({}, state, {
7338
+ return _extends$A({}, state, {
7257
7339
  toasts: state.toasts.filter(function (t) {
7258
7340
  return t.id !== action.toastId;
7259
7341
  })
7260
7342
  });
7261
7343
 
7262
7344
  case ActionType.START_PAUSE:
7263
- return _extends$z({}, state, {
7345
+ return _extends$A({}, state, {
7264
7346
  pausedAt: action.time
7265
7347
  });
7266
7348
 
7267
7349
  case ActionType.END_PAUSE:
7268
7350
  var diff = action.time - (state.pausedAt || 0);
7269
- return _extends$z({}, state, {
7351
+ return _extends$A({}, state, {
7270
7352
  pausedAt: undefined,
7271
7353
  toasts: state.toasts.map(function (t) {
7272
- return _extends$z({}, t, {
7354
+ return _extends$A({}, t, {
7273
7355
  pauseDuration: t.pauseDuration + diff
7274
7356
  });
7275
7357
  })
@@ -7316,12 +7398,12 @@ var useStore = function useStore(toastOptions) {
7316
7398
  var mergedToasts = state.toasts.map(function (t) {
7317
7399
  var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
7318
7400
 
7319
- return _extends$z({}, toastOptions, toastOptions[t.type], t, {
7401
+ return _extends$A({}, toastOptions, toastOptions[t.type], t, {
7320
7402
  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],
7321
- style: _extends$z({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7403
+ style: _extends$A({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7322
7404
  });
7323
7405
  });
7324
- return _extends$z({}, state, {
7406
+ return _extends$A({}, state, {
7325
7407
  toasts: mergedToasts
7326
7408
  });
7327
7409
  };
@@ -7331,7 +7413,7 @@ var createToast = function createToast(message, type, opts) {
7331
7413
  type = 'blank';
7332
7414
  }
7333
7415
 
7334
- return _extends$z({
7416
+ return _extends$A({
7335
7417
  createdAt: Date.now(),
7336
7418
  visible: true,
7337
7419
  type: type,
@@ -7381,14 +7463,14 @@ toast.remove = function (toastId) {
7381
7463
  };
7382
7464
 
7383
7465
  toast.promise = function (promise, msgs, opts) {
7384
- var id = toast.loading(msgs.loading, _extends$z({}, opts, opts == null ? void 0 : opts.loading));
7466
+ var id = toast.loading(msgs.loading, _extends$A({}, opts, opts == null ? void 0 : opts.loading));
7385
7467
  promise.then(function (p) {
7386
- toast.success(resolveValue(msgs.success, p), _extends$z({
7468
+ toast.success(resolveValue(msgs.success, p), _extends$A({
7387
7469
  id: id
7388
7470
  }, opts, opts == null ? void 0 : opts.success));
7389
7471
  return p;
7390
7472
  })["catch"](function (e) {
7391
- toast.error(resolveValue(msgs.error, e), _extends$z({
7473
+ toast.error(resolveValue(msgs.error, e), _extends$A({
7392
7474
  id: id
7393
7475
  }, opts, opts == null ? void 0 : opts.error));
7394
7476
  });
@@ -7727,7 +7809,7 @@ var ToastBar = /*#__PURE__*/React.memo(function (_ref2) {
7727
7809
  var message = React.createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
7728
7810
  return React.createElement(ToastBarBase, {
7729
7811
  className: toast.className,
7730
- style: _extends$z({}, animationStyle, style, toast.style)
7812
+ style: _extends$A({}, animationStyle, style, toast.style)
7731
7813
  }, typeof children === 'function' ? children({
7732
7814
  icon: icon,
7733
7815
  message: message
@@ -7757,7 +7839,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
7757
7839
  } : position.includes('right') ? {
7758
7840
  justifyContent: 'flex-end'
7759
7841
  } : {};
7760
- return _extends$z({
7842
+ return _extends$A({
7761
7843
  left: 0,
7762
7844
  right: 0,
7763
7845
  display: 'flex',
@@ -7784,7 +7866,7 @@ var Toaster = function Toaster(_ref) {
7784
7866
  handlers = _useToaster.handlers;
7785
7867
 
7786
7868
  return React.createElement("div", {
7787
- style: _extends$z({
7869
+ style: _extends$A({
7788
7870
  position: 'fixed',
7789
7871
  zIndex: 9999,
7790
7872
  top: DEFAULT_OFFSET,
@@ -7819,82 +7901,82 @@ var Toaster = function Toaster(_ref) {
7819
7901
  }));
7820
7902
  };
7821
7903
 
7822
- var _path$w;
7904
+ var _path$x;
7823
7905
 
7824
- 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); }
7906
+ 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); }
7825
7907
 
7826
7908
  function SvgCheckSolid(props) {
7827
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
7909
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$z({
7828
7910
  xmlns: "http://www.w3.org/2000/svg",
7829
7911
  className: "h-5 w-5",
7830
7912
  viewBox: "0 0 20 20",
7831
7913
  fill: "currentColor"
7832
- }, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
7914
+ }, props), _path$x || (_path$x = /*#__PURE__*/React__namespace.createElement("path", {
7833
7915
  fillRule: "evenodd",
7834
7916
  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",
7835
7917
  clipRule: "evenodd"
7836
7918
  })));
7837
7919
  }
7838
7920
 
7839
- var _path$v;
7921
+ var _path$w;
7840
7922
 
7841
- 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); }
7923
+ 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); }
7842
7924
 
7843
7925
  function SvgXIcon(props) {
7844
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
7926
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
7845
7927
  xmlns: "http://www.w3.org/2000/svg",
7846
7928
  viewBox: "0 0 20 20",
7847
7929
  fill: "currentColor"
7848
- }, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
7930
+ }, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
7849
7931
  fill: "evenodd",
7850
7932
  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",
7851
7933
  clipRule: "evenodd"
7852
7934
  })));
7853
7935
  }
7854
7936
 
7855
- var _path$u;
7937
+ var _path$v;
7856
7938
 
7857
- 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); }
7939
+ 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); }
7858
7940
 
7859
7941
  function SvgXIconSolid(props) {
7860
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
7942
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
7861
7943
  className: "plc-w-4 plc-h-4",
7862
7944
  fill: "currentColor",
7863
7945
  xmlns: "http://www.w3.org/2000/svg",
7864
7946
  viewBox: "0 0 100 100"
7865
- }, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
7947
+ }, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
7866
7948
  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"
7867
7949
  })));
7868
7950
  }
7869
7951
 
7870
- var _path$t;
7952
+ var _path$u;
7871
7953
 
7872
- 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); }
7954
+ 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); }
7873
7955
 
7874
7956
  function SvgExclamation(props) {
7875
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
7957
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
7876
7958
  className: "plc-w-4 plc-h-4 plc-mr-1",
7877
7959
  xmlns: "http://www.w3.org/2000/svg",
7878
7960
  viewBox: "0 0 20 20",
7879
7961
  fill: "currentColor"
7880
- }, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
7962
+ }, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
7881
7963
  fillRule: "evenodd",
7882
7964
  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",
7883
7965
  clipRule: "evenodd"
7884
7966
  })));
7885
7967
  }
7886
7968
 
7887
- var _path$s, _path2$4;
7969
+ var _path$t, _path2$4;
7888
7970
 
7889
- 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); }
7971
+ 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); }
7890
7972
 
7891
7973
  function SvgSpinner(props) {
7892
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
7974
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
7893
7975
  className: "plc-animate-spin",
7894
7976
  viewBox: "0 0 24 24",
7895
7977
  fill: "currentColor",
7896
7978
  xmlns: "http://www.w3.org/2000/svg"
7897
- }, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
7979
+ }, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
7898
7980
  opacity: 0.2,
7899
7981
  fill: "evenodd",
7900
7982
  clipRule: "evenodd",
@@ -8184,7 +8266,9 @@ const init$1 = () => {
8184
8266
  return switchToAddressView();
8185
8267
  });
8186
8268
  } else {
8187
- pelcroSubscribeButtonsByClass[j].addEventListener("click", () => switchView("plan-select"));
8269
+ pelcroSubscribeButtonsByClass[j].addEventListener("click", () => {
8270
+ return switchView("subscription-options");
8271
+ });
8188
8272
  }
8189
8273
  }
8190
8274
  }
@@ -8346,7 +8430,8 @@ function Link({
8346
8430
  const init = () => {
8347
8431
  const {
8348
8432
  switchView,
8349
- set
8433
+ set,
8434
+ setProductsList
8350
8435
  } = usePelcro.getStore();
8351
8436
  const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
8352
8437
 
@@ -8397,7 +8482,8 @@ const init = () => {
8397
8482
  }
8398
8483
 
8399
8484
  notify.dismiss(NOTIFICATION_ID);
8400
- switchView("_plan-select-entitlements");
8485
+ setProductsList(window.Pelcro.product.getByEntitlements(entitlements));
8486
+ switchView("plan-select");
8401
8487
  }
8402
8488
  }, "Subscribe"), "now to get full page access.")), {
8403
8489
  className: "pelcro-notification-entitlement",
@@ -9225,7 +9311,7 @@ const PelcroModalController = ({
9225
9311
  type
9226
9312
  }) => (type === null || type === void 0 ? void 0 : type.viewId) === "dashboard-open"), React__default['default'].Children.map(children, child => child).find(({
9227
9313
  type
9228
- }) => (type === null || type === void 0 ? void 0 : type.viewId) === "notification"), view === "_plan-select-entitlements" && React__default['default'].Children.map(children, child => child).find(({
9314
+ }) => (type === null || type === void 0 ? void 0 : type.viewId) === "notification"), view === "_plan-select-renew" && React__default['default'].Children.map(children, child => child).find(({
9229
9315
  type
9230
9316
  }) => (type === null || type === void 0 ? void 0 : type.viewId) === "plan-select"), React__default['default'].Children.map(children, child => child).find(({
9231
9317
  type
@@ -9506,8 +9592,10 @@ const LOAD_PAYMENT_METHODS = "LOAD_PAYMENT_METHODS";
9506
9592
  const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
9507
9593
  const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
9508
9594
  const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
9595
+ const SWITCH_TO_RENEW = "SWITCH_TO_RENEW";
9596
+ const SWITCH_TO_NEW = "SWITCH_TO_NEW";
9509
9597
 
9510
- const initialState$h = {
9598
+ const initialState$i = {
9511
9599
  email: "",
9512
9600
  password: "",
9513
9601
  emailError: null,
@@ -9518,10 +9606,10 @@ const initialState$h = {
9518
9606
  content: ""
9519
9607
  }
9520
9608
  };
9521
- const store$h = /*#__PURE__*/React.createContext(initialState$h);
9609
+ const store$i = /*#__PURE__*/React.createContext(initialState$i);
9522
9610
  const {
9523
- Provider: Provider$h
9524
- } = store$h;
9611
+ Provider: Provider$i
9612
+ } = store$i;
9525
9613
 
9526
9614
  const LoginContainer = ({
9527
9615
  style,
@@ -9628,7 +9716,7 @@ const LoginContainer = ({
9628
9716
  });
9629
9717
 
9630
9718
  case RESET_LOGIN_FORM:
9631
- return initialState$h;
9719
+ return initialState$i;
9632
9720
 
9633
9721
  case DISABLE_LOGIN_BUTTON:
9634
9722
  return lib_7({ ...state,
@@ -9646,12 +9734,12 @@ const LoginContainer = ({
9646
9734
  default:
9647
9735
  return state;
9648
9736
  }
9649
- }, initialState$h);
9737
+ }, initialState$i);
9650
9738
  return /*#__PURE__*/React__default['default'].createElement("div", {
9651
9739
  style: { ...style
9652
9740
  },
9653
9741
  className: `pelcro-container pelcro-login-container ${className}`
9654
- }, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
9742
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$i, {
9655
9743
  value: {
9656
9744
  state,
9657
9745
  dispatch
@@ -9659,12 +9747,12 @@ const LoginContainer = ({
9659
9747
  }, children.length ? children.map((child, i) => {
9660
9748
  if (child) {
9661
9749
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
9662
- store: store$h,
9750
+ store: store$i,
9663
9751
  key: i
9664
9752
  });
9665
9753
  }
9666
9754
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
9667
- store: store$h
9755
+ store: store$i
9668
9756
  })));
9669
9757
  };
9670
9758
 
@@ -9909,7 +9997,7 @@ const LoginButton = ({
9909
9997
  buttonDisabled
9910
9998
  },
9911
9999
  dispatch
9912
- } = React.useContext(store$h);
10000
+ } = React.useContext(store$i);
9913
10001
  const {
9914
10002
  t
9915
10003
  } = useTranslation("login");
@@ -9930,23 +10018,23 @@ const LoginButton = ({
9930
10018
  };
9931
10019
 
9932
10020
  const LoginEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
9933
- store: store$h
10021
+ store: store$i
9934
10022
  }, props));
9935
10023
 
9936
10024
  const LoginPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
9937
- store: store$h
10025
+ store: store$i
9938
10026
  }, props));
9939
10027
 
9940
- var _path$r;
10028
+ var _path$s;
9941
10029
 
9942
- 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); }
10030
+ 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); }
9943
10031
 
9944
10032
  function SvgCheck(props) {
9945
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
10033
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
9946
10034
  xmlns: "http://www.w3.org/2000/svg",
9947
10035
  fill: "currentColor",
9948
10036
  viewBox: "0 0 20 20"
9949
- }, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
10037
+ }, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
9950
10038
  fillRule: "evenodd",
9951
10039
  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",
9952
10040
  clipRule: "evenodd"
@@ -10011,7 +10099,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
10011
10099
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
10012
10100
  facebookLoginRenderProps.FacebookLogin;
10013
10101
 
10014
- const initialState$g = {
10102
+ const initialState$h = {
10015
10103
  email: "",
10016
10104
  password: "",
10017
10105
  emailError: null,
@@ -10028,10 +10116,10 @@ const initialState$g = {
10028
10116
  content: ""
10029
10117
  }
10030
10118
  };
10031
- const store$g = /*#__PURE__*/React.createContext(initialState$g);
10119
+ const store$h = /*#__PURE__*/React.createContext(initialState$h);
10032
10120
  const {
10033
- Provider: Provider$g
10034
- } = store$g;
10121
+ Provider: Provider$h
10122
+ } = store$h;
10035
10123
 
10036
10124
  const RegisterContainer = ({
10037
10125
  style,
@@ -10214,7 +10302,7 @@ const RegisterContainer = ({
10214
10302
  });
10215
10303
 
10216
10304
  case RESET_LOGIN_FORM:
10217
- return initialState$g;
10305
+ return initialState$h;
10218
10306
 
10219
10307
  case DISABLE_REGISTRATION_BUTTON:
10220
10308
  return lib_7({ ...state,
@@ -10232,12 +10320,12 @@ const RegisterContainer = ({
10232
10320
  default:
10233
10321
  return state;
10234
10322
  }
10235
- }, initialState$g);
10323
+ }, initialState$h);
10236
10324
  return /*#__PURE__*/React__default['default'].createElement("div", {
10237
10325
  style: { ...style
10238
10326
  },
10239
10327
  className: `pelcro-container pelcro-register-container ${className}`
10240
- }, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
10328
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
10241
10329
  value: {
10242
10330
  state,
10243
10331
  dispatch
@@ -10245,12 +10333,12 @@ const RegisterContainer = ({
10245
10333
  }, children.length ? children.map((child, i) => {
10246
10334
  if (child) {
10247
10335
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
10248
- store: store$g,
10336
+ store: store$h,
10249
10337
  key: i
10250
10338
  });
10251
10339
  }
10252
10340
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
10253
- store: store$g
10341
+ store: store$h
10254
10342
  })));
10255
10343
  };
10256
10344
  /**
@@ -10265,15 +10353,15 @@ function hasSecurityTokenEnabled$1() {
10265
10353
  return hasSecuritySdkLoaded;
10266
10354
  }
10267
10355
 
10268
- var _path$q;
10356
+ var _path$r;
10269
10357
 
10270
- 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); }
10358
+ 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); }
10271
10359
 
10272
10360
  function SvgFacebookLogo(props) {
10273
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
10361
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
10274
10362
  xmlns: "http://www.w3.org/2000/svg",
10275
10363
  viewBox: "88.428 12.828 107.543 207.085"
10276
- }, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
10364
+ }, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
10277
10365
  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",
10278
10366
  fill: "#3c5a9a"
10279
10367
  })));
@@ -10290,10 +10378,10 @@ const FacebookLoginButton = ({
10290
10378
  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;
10291
10379
  const {
10292
10380
  dispatch: loginDispatch
10293
- } = React.useContext(store$h);
10381
+ } = React.useContext(store$i);
10294
10382
  const {
10295
10383
  dispatch: registerDispatch
10296
- } = React.useContext(store$g);
10384
+ } = React.useContext(store$h);
10297
10385
 
10298
10386
  const onSuccess = facebookUser => {
10299
10387
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
@@ -10346,15 +10434,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
10346
10434
  unwrapExports(googleLogin);
10347
10435
  var googleLogin_1 = googleLogin.GoogleLogin;
10348
10436
 
10349
- var _path$p, _path2$3, _path3$1, _path4;
10437
+ var _path$q, _path2$3, _path3$1, _path4;
10350
10438
 
10351
- 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); }
10439
+ 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); }
10352
10440
 
10353
10441
  function SvgGoogleLogo(props) {
10354
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
10442
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
10355
10443
  viewBox: "0 0 24 24",
10356
10444
  xmlns: "http://www.w3.org/2000/svg"
10357
- }, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
10445
+ }, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
10358
10446
  fill: "#4285F4",
10359
10447
  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"
10360
10448
  })), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
@@ -10380,10 +10468,10 @@ const GoogleLoginButton = ({
10380
10468
  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;
10381
10469
  const {
10382
10470
  dispatch: loginDispatch
10383
- } = React.useContext(store$h);
10471
+ } = React.useContext(store$i);
10384
10472
  const {
10385
10473
  dispatch: registerDispatch
10386
- } = React.useContext(store$g);
10474
+ } = React.useContext(store$h);
10387
10475
 
10388
10476
  const onSuccess = response => {
10389
10477
  var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
@@ -10431,15 +10519,15 @@ const GoogleLoginButton = ({
10431
10519
  }) : null;
10432
10520
  };
10433
10521
 
10434
- var _path$o;
10522
+ var _path$p;
10435
10523
 
10436
- 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); }
10524
+ 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); }
10437
10525
 
10438
10526
  function SvgAuth0Logo(props) {
10439
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
10527
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
10440
10528
  viewBox: "0 0 256 285",
10441
10529
  xmlns: "http://www.w3.org/2000/svg"
10442
- }, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
10530
+ }, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
10443
10531
  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"
10444
10532
  })));
10445
10533
  }
@@ -10479,10 +10567,10 @@ const Auth0LoginButton = ({
10479
10567
  }, [auth0Enabled, auth0Loaded]);
10480
10568
  const {
10481
10569
  dispatch: loginDispatch
10482
- } = React.useContext(store$h);
10570
+ } = React.useContext(store$i);
10483
10571
  const {
10484
10572
  dispatch: registerDispatch
10485
- } = React.useContext(store$g);
10573
+ } = React.useContext(store$h);
10486
10574
 
10487
10575
  function handleClick() {
10488
10576
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
@@ -10615,15 +10703,15 @@ function LoginView(props) {
10615
10703
  }, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, null), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, null), /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, null))))));
10616
10704
  }
10617
10705
 
10618
- var _path$n, _path2$2, _path3;
10706
+ var _path$o, _path2$2, _path3;
10619
10707
 
10620
- 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); }
10708
+ 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); }
10621
10709
 
10622
10710
  function SvgPelcroAuthorship(props) {
10623
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
10711
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
10624
10712
  xmlns: "http://www.w3.org/2000/svg",
10625
10713
  viewBox: "0 -80.652 497.072 179.991"
10626
- }, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
10714
+ }, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
10627
10715
  fill: "none",
10628
10716
  stroke: "#4a4a4a",
10629
10717
  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"
@@ -10770,11 +10858,11 @@ function LoginModal({
10770
10858
  LoginModal.viewId = "login";
10771
10859
 
10772
10860
  const RegisterEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
10773
- store: store$g
10861
+ store: store$h
10774
10862
  }, props));
10775
10863
 
10776
10864
  const RegisterPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
10777
- store: store$g
10865
+ store: store$h
10778
10866
  }, props));
10779
10867
 
10780
10868
  const RegisterButton = ({
@@ -10794,7 +10882,7 @@ const RegisterButton = ({
10794
10882
  buttonDisabled
10795
10883
  },
10796
10884
  dispatch
10797
- } = React.useContext(store$g);
10885
+ } = React.useContext(store$h);
10798
10886
  const {
10799
10887
  t
10800
10888
  } = useTranslation("register");
@@ -10932,7 +11020,7 @@ function FirstName({
10932
11020
  }
10933
11021
 
10934
11022
  const RegisterFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
10935
- store: store$g
11023
+ store: store$h
10936
11024
  }, props));
10937
11025
 
10938
11026
  function LastName({
@@ -10963,7 +11051,7 @@ function LastName({
10963
11051
  }
10964
11052
 
10965
11053
  const RegisterLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
10966
- store: store$g
11054
+ store: store$h
10967
11055
  }, props));
10968
11056
 
10969
11057
  /**
@@ -11087,7 +11175,7 @@ function TextInput({
11087
11175
 
11088
11176
  const RegisterTextInput = props => {
11089
11177
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
11090
- store: store$g
11178
+ store: store$h
11091
11179
  }));
11092
11180
  };
11093
11181
 
@@ -11234,6 +11322,7 @@ function SelectModalWithHook(props) {
11234
11322
  (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
11235
11323
  }, []);
11236
11324
  const {
11325
+ productsList,
11237
11326
  isGift,
11238
11327
  plan,
11239
11328
  product,
@@ -11243,11 +11332,12 @@ function SelectModalWithHook(props) {
11243
11332
  view,
11244
11333
  set
11245
11334
  } = usePelcro();
11246
- const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
11247
- const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
11335
+ const isRenewingSub = view === "_plan-select-renew";
11248
11336
  return /*#__PURE__*/React__default['default'].createElement(SelectModalWithTrans, {
11337
+ productsList: productsList,
11249
11338
  isGift: isGift,
11250
- disableGifting: isRenewingGift,
11339
+ disableGifting: isRenewingGift || isRenewingSub,
11340
+ isRenewingSub: isRenewingSub,
11251
11341
  plan: plan,
11252
11342
  product: product,
11253
11343
  onClose: () => {
@@ -11261,8 +11351,10 @@ function SelectModalWithHook(props) {
11261
11351
  plan,
11262
11352
  isGift
11263
11353
  }),
11264
- setView: switchView,
11265
- matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
11354
+ setSubscriptionIdToRenew: subscriptionIdToRenew => set({
11355
+ subscriptionIdToRenew
11356
+ }),
11357
+ setView: switchView
11266
11358
  });
11267
11359
  }
11268
11360
  SelectModalWithHook.viewId = "plan-select";
@@ -11294,10 +11386,10 @@ class SelectModal extends React.Component {
11294
11386
  });
11295
11387
  }
11296
11388
 
11297
- if (this.state.productList.length === 1) {
11389
+ if (this.props.productsList.length === 1) {
11298
11390
  this.setState({
11299
- product: this.state.productList[0],
11300
- planList: this.state.productList[0].plans,
11391
+ product: this.props.productsList[0],
11392
+ planList: this.props.productsList[0].plans,
11301
11393
  mode: "plan"
11302
11394
  });
11303
11395
  }
@@ -11314,7 +11406,7 @@ class SelectModal extends React.Component {
11314
11406
  });
11315
11407
 
11316
11408
  _defineProperty$3(this, "onProductChange", e => {
11317
- const product = window.Pelcro.product.list()[e.target.selectedIndex];
11409
+ const product = productsList[e.target.selectedIndex];
11318
11410
  this.setState({
11319
11411
  product: product,
11320
11412
  plan: product.plans[0]
@@ -11380,7 +11472,7 @@ class SelectModal extends React.Component {
11380
11472
 
11381
11473
  _defineProperty$3(this, "renderProducts", () => {
11382
11474
  const userDidSelectProduct = Boolean(this.state.mode === "plan");
11383
- const productsToShow = userDidSelectProduct ? [this.state.product] : this.state.productList;
11475
+ const productsToShow = userDidSelectProduct ? [this.state.product] : this.props.productsList;
11384
11476
  return productsToShow.map((product, index) => {
11385
11477
  return this.renderOneProduct(product, index);
11386
11478
  });
@@ -11393,7 +11485,7 @@ class SelectModal extends React.Component {
11393
11485
  return this.renderOneProduct(this.state.product);
11394
11486
  }
11395
11487
 
11396
- const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(); // Render normal products if there are no available matching products
11488
+ const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(this.props.productsList); // Render normal products if there are no available matching products
11397
11489
 
11398
11490
  if (!(productsThatMatchArticleTag !== null && productsThatMatchArticleTag !== void 0 && productsThatMatchArticleTag.length)) {
11399
11491
  return this.renderProducts();
@@ -11409,10 +11501,7 @@ class SelectModal extends React.Component {
11409
11501
  className: "plc-text-sm plc-font-semibold"
11410
11502
  }, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
11411
11503
 
11412
- function productsWithMatchedTaggedFirst() {
11413
- var _window$Pelcro$produc;
11414
-
11415
- const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
11504
+ function productsWithMatchedTaggedFirst(allProducts) {
11416
11505
  const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
11417
11506
  const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
11418
11507
  return [productsThatMatchArticleTag, allProductsMinusMatched];
@@ -11446,7 +11535,7 @@ class SelectModal extends React.Component {
11446
11535
  _defineProperty$3(this, "selectProduct", e => {
11447
11536
  const id = e.target.dataset.key;
11448
11537
 
11449
- for (const product of this.state.productList) {
11538
+ for (const product of this.props.productsList) {
11450
11539
  if (+product.id === +id) {
11451
11540
  var _this$state$plan;
11452
11541
 
@@ -11499,6 +11588,14 @@ class SelectModal extends React.Component {
11499
11588
 
11500
11589
  _defineProperty$3(this, "submitOption", () => {
11501
11590
  this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift);
11591
+
11592
+ if (this.props.isRenewingSub) {
11593
+ var _matchingSub$id;
11594
+
11595
+ const matchingSub = window.Pelcro.subscription.list().find(sub => sub.plan.id === this.state.plan.id && sub.status === "active" && sub.cancel_at_period_end === 1);
11596
+ this.props.setSubscriptionIdToRenew((_matchingSub$id = matchingSub === null || matchingSub === void 0 ? void 0 : matchingSub.id) !== null && _matchingSub$id !== void 0 ? _matchingSub$id : null);
11597
+ }
11598
+
11502
11599
  const {
11503
11600
  product,
11504
11601
  isGift
@@ -11536,8 +11633,7 @@ class SelectModal extends React.Component {
11536
11633
  plan: {},
11537
11634
  isGift: props.isGift,
11538
11635
  disabled: true,
11539
- mode: "product",
11540
- productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
11636
+ mode: "product"
11541
11637
  };
11542
11638
  this.product = this.props.product || window.Pelcro.paywall.getProduct();
11543
11639
  this.locale = this.props.t;
@@ -11545,7 +11641,7 @@ class SelectModal extends React.Component {
11545
11641
  }
11546
11642
 
11547
11643
  render() {
11548
- var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
11644
+ var _this$props$productsL, _this$props$productsL2, _window$Pelcro$site$r;
11549
11645
 
11550
11646
  const {
11551
11647
  disableGifting
@@ -11579,7 +11675,7 @@ class SelectModal extends React.Component {
11579
11675
  className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
11580
11676
  }, /*#__PURE__*/React__default['default'].createElement("h4", {
11581
11677
  className: "plc-text-2xl plc-font-semibold"
11582
- }, 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['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['default'].createElement("div", {
11678
+ }, 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['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['default'].createElement("div", {
11583
11679
  className: "pelcro-select-products-wrapper"
11584
11680
  }, (_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['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
11585
11681
  className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
@@ -13329,7 +13425,7 @@ class VantivGateway {
13329
13425
 
13330
13426
  /** @type {PaymentStateType} */
13331
13427
 
13332
- const initialState$f = {
13428
+ const initialState$g = {
13333
13429
  disableSubmit: false,
13334
13430
  isLoading: false,
13335
13431
  disableCouponButton: false,
@@ -13348,10 +13444,10 @@ const initialState$f = {
13348
13444
  content: ""
13349
13445
  }
13350
13446
  };
13351
- const store$f = /*#__PURE__*/React.createContext(initialState$f);
13447
+ const store$g = /*#__PURE__*/React.createContext(initialState$g);
13352
13448
  const {
13353
- Provider: Provider$f
13354
- } = store$f;
13449
+ Provider: Provider$g
13450
+ } = store$g;
13355
13451
 
13356
13452
  const PaymentMethodContainerWithoutStripe = ({
13357
13453
  style,
@@ -14551,21 +14647,21 @@ const PaymentMethodContainerWithoutStripe = ({
14551
14647
  default:
14552
14648
  return state;
14553
14649
  }
14554
- }, initialState$f);
14650
+ }, initialState$g);
14555
14651
  return /*#__PURE__*/React__default['default'].createElement("div", {
14556
14652
  style: { ...style
14557
14653
  },
14558
14654
  className: `pelcro-container pelcro-payment-container ${className}`
14559
- }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
14655
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
14560
14656
  value: {
14561
14657
  state,
14562
14658
  dispatch
14563
14659
  }
14564
14660
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
14565
- store: store$f,
14661
+ store: store$g,
14566
14662
  key: i
14567
14663
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
14568
- store: store$f
14664
+ store: store$g
14569
14665
  })));
14570
14666
  };
14571
14667
 
@@ -14587,7 +14683,7 @@ const PaymentMethodContainer = props => {
14587
14683
  stripeAccount: window.Pelcro.site.read().account_id,
14588
14684
  locale: getPageOrDefaultLanguage()
14589
14685
  }, /*#__PURE__*/React__default['default'].createElement(es_11, null, /*#__PURE__*/React__default['default'].createElement(UnwrappedForm, Object.assign({
14590
- store: store$f
14686
+ store: store$g
14591
14687
  }, props))));
14592
14688
  }
14593
14689
 
@@ -14640,7 +14736,7 @@ const PelcroPaymentRequestButton = props => {
14640
14736
  currentPlan,
14641
14737
  updatedPrice
14642
14738
  }
14643
- } = React.useContext(store$f);
14739
+ } = React.useContext(store$g);
14644
14740
 
14645
14741
  const updatePaymentRequest = () => {
14646
14742
  // Make sure payment request is up to date, eg. user added a coupon code.
@@ -14716,7 +14812,7 @@ const DiscountedPrice = props => {
14716
14812
  taxAmount,
14717
14813
  percentOff
14718
14814
  }
14719
- } = React.useContext(store$f);
14815
+ } = React.useContext(store$g);
14720
14816
  const {
14721
14817
  order,
14722
14818
  plan
@@ -14766,7 +14862,7 @@ const SubmitPaymentMethod = ({
14766
14862
  isLoading,
14767
14863
  updatedPrice
14768
14864
  }
14769
- } = React.useContext(store$f);
14865
+ } = React.useContext(store$g);
14770
14866
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
14771
14867
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
14772
14868
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -14787,17 +14883,17 @@ const SubmitPaymentMethod = ({
14787
14883
  }, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
14788
14884
  };
14789
14885
 
14790
- var _path$m;
14886
+ var _path$n;
14791
14887
 
14792
- 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); }
14888
+ 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); }
14793
14889
 
14794
14890
  function SvgArrowLeft(props) {
14795
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
14891
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
14796
14892
  xmlns: "http://www.w3.org/2000/svg",
14797
14893
  fill: "none",
14798
14894
  viewBox: "0 0 24 24",
14799
14895
  stroke: "currentColor"
14800
- }, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
14896
+ }, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
14801
14897
  strokeLinecap: "round",
14802
14898
  strokeLinejoin: "round",
14803
14899
  strokeWidth: 2,
@@ -14816,7 +14912,7 @@ const ApplyCouponButton = ({
14816
14912
  disableCouponButton
14817
14913
  },
14818
14914
  dispatch
14819
- } = React.useContext(store$f);
14915
+ } = React.useContext(store$g);
14820
14916
  const {
14821
14917
  t
14822
14918
  } = useTranslation("checkoutForm");
@@ -14850,7 +14946,7 @@ const CouponCodeField = props => {
14850
14946
  couponCode,
14851
14947
  couponError
14852
14948
  }
14853
- } = React.useContext(store$f);
14949
+ } = React.useContext(store$g);
14854
14950
 
14855
14951
  const onCouponCodeChange = e => {
14856
14952
  dispatch({
@@ -14879,17 +14975,17 @@ const CouponCodeField = props => {
14879
14975
  }, props));
14880
14976
  };
14881
14977
 
14882
- var _path$l;
14978
+ var _path$m;
14883
14979
 
14884
- 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); }
14980
+ 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); }
14885
14981
 
14886
14982
  function SvgTicket(props) {
14887
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
14983
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
14888
14984
  xmlns: "http://www.w3.org/2000/svg",
14889
14985
  fill: "none",
14890
14986
  viewBox: "0 0 24 24",
14891
14987
  stroke: "currentColor"
14892
- }, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
14988
+ }, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
14893
14989
  strokeLinecap: "round",
14894
14990
  strokeLinejoin: "round",
14895
14991
  strokeWidth: 2,
@@ -14906,7 +15002,7 @@ const CouponCode = ({
14906
15002
  state: {
14907
15003
  enableCouponField
14908
15004
  }
14909
- } = React.useContext(store$f);
15005
+ } = React.useContext(store$g);
14910
15006
  const {
14911
15007
  t
14912
15008
  } = useTranslation("checkoutForm");
@@ -15163,7 +15259,7 @@ const PaypalSubscribeButton = props => {
15163
15259
  const {
15164
15260
  dispatch,
15165
15261
  state
15166
- } = React.useContext(store$f);
15262
+ } = React.useContext(store$g);
15167
15263
  const {
15168
15264
  product,
15169
15265
  plan,
@@ -15249,16 +15345,16 @@ const BankRedirection = () => {
15249
15345
  }));
15250
15346
  };
15251
15347
 
15252
- var _path$k;
15348
+ var _path$l;
15253
15349
 
15254
- 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); }
15350
+ 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); }
15255
15351
 
15256
15352
  function SvgLock(props) {
15257
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
15353
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
15258
15354
  xmlns: "http://www.w3.org/2000/svg",
15259
15355
  viewBox: "0 0 20 20",
15260
15356
  fill: "currentColor"
15261
- }, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
15357
+ }, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
15262
15358
  fillRule: "evenodd",
15263
15359
  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",
15264
15360
  clipRule: "evenodd"
@@ -15275,7 +15371,7 @@ const SelectedPaymentMethod = () => {
15275
15371
  state: {
15276
15372
  isLoading
15277
15373
  }
15278
- } = React.useContext(store$f);
15374
+ } = React.useContext(store$g);
15279
15375
  const {
15280
15376
  switchView,
15281
15377
  selectedPaymentMethodId
@@ -15317,7 +15413,7 @@ const TaxAmount = () => {
15317
15413
  state: {
15318
15414
  taxAmount
15319
15415
  }
15320
- } = React.useContext(store$f);
15416
+ } = React.useContext(store$g);
15321
15417
  const {
15322
15418
  plan
15323
15419
  } = usePelcro();
@@ -15481,12 +15577,12 @@ function SubscriptionRenewModal({
15481
15577
  }
15482
15578
  SubscriptionRenewModal.viewId = "subscription-renew";
15483
15579
 
15484
- var _path$j;
15580
+ var _path$k;
15485
15581
 
15486
- 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); }
15582
+ 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); }
15487
15583
 
15488
15584
  function SvgGift(props) {
15489
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
15585
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
15490
15586
  className: "plc-w-6 plc-h-6 plc-mr-2",
15491
15587
  fill: "none",
15492
15588
  stroke: "currentColor",
@@ -15495,7 +15591,7 @@ function SvgGift(props) {
15495
15591
  strokeWidth: 2,
15496
15592
  viewBox: "0 0 24 24",
15497
15593
  xmlns: "http://www.w3.org/2000/svg"
15498
- }, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
15594
+ }, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
15499
15595
  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"
15500
15596
  })));
15501
15597
  }
@@ -15836,7 +15932,7 @@ class DefaultNewsLetter extends React.Component {
15836
15932
 
15837
15933
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
15838
15934
 
15839
- const initialState$e = {
15935
+ const initialState$f = {
15840
15936
  didSubToNewslettersBefore: false,
15841
15937
  newsletters: [],
15842
15938
  isListLoading: true,
@@ -15846,10 +15942,10 @@ const initialState$e = {
15846
15942
  content: ""
15847
15943
  }
15848
15944
  };
15849
- const store$e = /*#__PURE__*/React.createContext(initialState$e);
15945
+ const store$f = /*#__PURE__*/React.createContext(initialState$f);
15850
15946
  const {
15851
- Provider: Provider$e
15852
- } = store$e;
15947
+ Provider: Provider$f
15948
+ } = store$f;
15853
15949
 
15854
15950
  const NewsletterUpdateContainer = ({
15855
15951
  style,
@@ -15962,7 +16058,7 @@ const NewsletterUpdateContainer = ({
15962
16058
  default:
15963
16059
  return state;
15964
16060
  }
15965
- }, initialState$e);
16061
+ }, initialState$f);
15966
16062
  React.useEffect(() => {
15967
16063
  const getUserNewsletters = () => {
15968
16064
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -16006,7 +16102,7 @@ const NewsletterUpdateContainer = ({
16006
16102
  style: { ...style
16007
16103
  },
16008
16104
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
16009
- }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
16105
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
16010
16106
  value: {
16011
16107
  state,
16012
16108
  dispatch
@@ -16014,12 +16110,12 @@ const NewsletterUpdateContainer = ({
16014
16110
  }, children.length ? children.map((child, i) => {
16015
16111
  if (child) {
16016
16112
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
16017
- store: store$e,
16113
+ store: store$f,
16018
16114
  key: i
16019
16115
  });
16020
16116
  }
16021
16117
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
16022
- store: store$e
16118
+ store: store$f
16023
16119
  })));
16024
16120
  };
16025
16121
 
@@ -16034,7 +16130,7 @@ const NewsletterUpdateButton = ({
16034
16130
  isSubmitting,
16035
16131
  isListLoading
16036
16132
  }
16037
- } = React.useContext(store$e);
16133
+ } = React.useContext(store$f);
16038
16134
  const {
16039
16135
  t
16040
16136
  } = useTranslation("newsletter");
@@ -16064,7 +16160,7 @@ const NewsletterUpdateList = () => {
16064
16160
  newsletters,
16065
16161
  isListLoading
16066
16162
  }
16067
- } = React.useContext(store$e);
16163
+ } = React.useContext(store$f);
16068
16164
 
16069
16165
  if (isListLoading) {
16070
16166
  return /*#__PURE__*/React__default['default'].createElement(Loader, {
@@ -16268,7 +16364,7 @@ function SubscriptionCreateModal({
16268
16364
  SubscriptionCreateModal.viewId = "subscription-create";
16269
16365
 
16270
16366
  var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
16271
- const initialState$d = {
16367
+ const initialState$e = {
16272
16368
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
16273
16369
  firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
16274
16370
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
@@ -16281,10 +16377,10 @@ const initialState$d = {
16281
16377
  content: ""
16282
16378
  }
16283
16379
  };
16284
- const store$d = /*#__PURE__*/React.createContext(initialState$d);
16380
+ const store$e = /*#__PURE__*/React.createContext(initialState$e);
16285
16381
  const {
16286
- Provider: Provider$d
16287
- } = store$d;
16382
+ Provider: Provider$e
16383
+ } = store$e;
16288
16384
 
16289
16385
  const UserUpdateContainer = ({
16290
16386
  style,
@@ -16416,27 +16512,27 @@ const UserUpdateContainer = ({
16416
16512
  default:
16417
16513
  return state;
16418
16514
  }
16419
- }, initialState$d);
16515
+ }, initialState$e);
16420
16516
  return /*#__PURE__*/React__default['default'].createElement("div", {
16421
16517
  style: { ...style
16422
16518
  },
16423
16519
  className: `pelcro-container pelcro-user-update-container ${className}`
16424
- }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
16520
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
16425
16521
  value: {
16426
16522
  state,
16427
16523
  dispatch
16428
16524
  }
16429
16525
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
16430
- store: store$d,
16526
+ store: store$e,
16431
16527
  key: i
16432
16528
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
16433
- store: store$d
16529
+ store: store$e
16434
16530
  })));
16435
16531
  };
16436
16532
 
16437
16533
  const UserUpdateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
16438
16534
  disabled: true,
16439
- store: store$d
16535
+ store: store$e
16440
16536
  }, props));
16441
16537
 
16442
16538
  const UserUpdateButton = ({
@@ -16449,7 +16545,7 @@ const UserUpdateButton = ({
16449
16545
  buttonDisabled
16450
16546
  },
16451
16547
  dispatch
16452
- } = React.useContext(store$d);
16548
+ } = React.useContext(store$e);
16453
16549
  const {
16454
16550
  t
16455
16551
  } = useTranslation("userEdit");
@@ -16466,11 +16562,11 @@ const UserUpdateButton = ({
16466
16562
  };
16467
16563
 
16468
16564
  const UserUpdateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
16469
- store: store$d
16565
+ store: store$e
16470
16566
  }, props));
16471
16567
 
16472
16568
  const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
16473
- store: store$d
16569
+ store: store$e
16474
16570
  }, props));
16475
16571
 
16476
16572
  function Phone({
@@ -16499,22 +16595,22 @@ function Phone({
16499
16595
  }
16500
16596
 
16501
16597
  const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
16502
- store: store$d
16598
+ store: store$e
16503
16599
  }, props));
16504
16600
 
16505
16601
  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";
16506
16602
 
16507
- var _path$i;
16603
+ var _path$j;
16508
16604
 
16509
- 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); }
16605
+ 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); }
16510
16606
 
16511
16607
  function SvgEdit(props) {
16512
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
16608
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
16513
16609
  className: "plc-w-6 plc-h-6",
16514
16610
  xmlns: "http://www.w3.org/2000/svg",
16515
16611
  viewBox: "0 0 20 20",
16516
16612
  fill: "currentColor"
16517
- }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
16613
+ }, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
16518
16614
  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"
16519
16615
  })));
16520
16616
  }
@@ -16646,16 +16742,16 @@ function DisplayName({
16646
16742
  }
16647
16743
 
16648
16744
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default['default'].createElement(DisplayName, Object.assign({
16649
- store: store$d
16745
+ store: store$e
16650
16746
  }, props));
16651
16747
 
16652
16748
  const UserUpdateTextInput = props => {
16653
16749
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
16654
- store: store$d
16750
+ store: store$e
16655
16751
  }));
16656
16752
  };
16657
16753
 
16658
- const initialState$c = {
16754
+ const initialState$d = {
16659
16755
  isSubmitting: false,
16660
16756
  firstName: "",
16661
16757
  firstNameError: "",
@@ -16680,10 +16776,10 @@ const initialState$c = {
16680
16776
  content: ""
16681
16777
  }
16682
16778
  };
16683
- const store$c = /*#__PURE__*/React.createContext(initialState$c);
16779
+ const store$d = /*#__PURE__*/React.createContext(initialState$d);
16684
16780
  const {
16685
- Provider: Provider$c
16686
- } = store$c;
16781
+ Provider: Provider$d
16782
+ } = store$d;
16687
16783
 
16688
16784
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
16689
16785
 
@@ -16890,7 +16986,7 @@ const AddressCreateContainer = ({
16890
16986
  default:
16891
16987
  return state;
16892
16988
  }
16893
- }, initialState$c);
16989
+ }, initialState$d);
16894
16990
  React.useEffect(() => {
16895
16991
  const getStates = () => {
16896
16992
  dispatch({
@@ -16922,16 +17018,16 @@ const AddressCreateContainer = ({
16922
17018
  style: { ...style
16923
17019
  },
16924
17020
  className: `pelcro-container pelcro-address-create-container ${className}`
16925
- }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
17021
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
16926
17022
  value: {
16927
17023
  state,
16928
17024
  dispatch
16929
17025
  }
16930
17026
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
16931
- store: store$c,
17027
+ store: store$d,
16932
17028
  key: i
16933
17029
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
16934
- store: store$c
17030
+ store: store$d
16935
17031
  })));
16936
17032
  };
16937
17033
 
@@ -16942,7 +17038,7 @@ function AddressCreateFirstName(props) {
16942
17038
  firstName,
16943
17039
  firstNameError
16944
17040
  }
16945
- } = React.useContext(store$c);
17041
+ } = React.useContext(store$d);
16946
17042
 
16947
17043
  const handleBlur = () => {
16948
17044
  return dispatch({
@@ -16985,7 +17081,7 @@ function AddressCreateLastName(props) {
16985
17081
  lastName,
16986
17082
  lastNameError
16987
17083
  }
16988
- } = React.useContext(store$c);
17084
+ } = React.useContext(store$d);
16989
17085
 
16990
17086
  const handleBlur = () => {
16991
17087
  return dispatch({
@@ -17028,7 +17124,7 @@ function AddressCreateLine1(props) {
17028
17124
  line1,
17029
17125
  line1Error
17030
17126
  }
17031
- } = React.useContext(store$c);
17127
+ } = React.useContext(store$d);
17032
17128
 
17033
17129
  const handleBlur = () => {
17034
17130
  return dispatch({
@@ -17071,7 +17167,7 @@ function AddressCreateCity(props) {
17071
17167
  city,
17072
17168
  cityError
17073
17169
  }
17074
- } = React.useContext(store$c);
17170
+ } = React.useContext(store$d);
17075
17171
 
17076
17172
  const handleBlur = () => {
17077
17173
  return dispatch({
@@ -17114,7 +17210,7 @@ function AddressCreatePostalCode(props) {
17114
17210
  postalCode,
17115
17211
  postalCodeError
17116
17212
  }
17117
- } = React.useContext(store$c);
17213
+ } = React.useContext(store$d);
17118
17214
 
17119
17215
  const handleBlur = () => {
17120
17216
  return dispatch({
@@ -17160,7 +17256,7 @@ const AddressCreateSubmit = ({
17160
17256
  state: {
17161
17257
  isSubmitting
17162
17258
  }
17163
- } = React.useContext(store$c);
17259
+ } = React.useContext(store$d);
17164
17260
  const {
17165
17261
  t
17166
17262
  } = useTranslation("address");
@@ -17271,7 +17367,7 @@ function CountrySelect({
17271
17367
  }
17272
17368
 
17273
17369
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
17274
- store: store$c
17370
+ store: store$d
17275
17371
  }, props));
17276
17372
 
17277
17373
  function StateSelect({
@@ -17359,7 +17455,7 @@ function StateSelect({
17359
17455
  }
17360
17456
 
17361
17457
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
17362
- store: store$c
17458
+ store: store$d
17363
17459
  }, props));
17364
17460
 
17365
17461
  const AddressCreateView = props => {
@@ -17464,18 +17560,18 @@ AddressCreateModal.viewId = "address-create";
17464
17560
 
17465
17561
  const AddressCreateTextInput = props => {
17466
17562
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
17467
- store: store$c
17563
+ store: store$d
17468
17564
  }));
17469
17565
  };
17470
17566
 
17471
17567
  const AddressCreateLine2 = props => {
17472
17568
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
17473
17569
  fieldName: "line2",
17474
- store: store$c
17570
+ store: store$d
17475
17571
  }, props));
17476
17572
  };
17477
17573
 
17478
- const initialState$b = {
17574
+ const initialState$c = {
17479
17575
  isSubmitting: false,
17480
17576
  firstName: "",
17481
17577
  firstNameError: "",
@@ -17500,10 +17596,10 @@ const initialState$b = {
17500
17596
  content: ""
17501
17597
  }
17502
17598
  };
17503
- const store$b = /*#__PURE__*/React.createContext(initialState$b);
17599
+ const store$c = /*#__PURE__*/React.createContext(initialState$c);
17504
17600
  const {
17505
- Provider: Provider$b
17506
- } = store$b;
17601
+ Provider: Provider$c
17602
+ } = store$c;
17507
17603
 
17508
17604
  const AddressUpdateContainer = ({
17509
17605
  style,
@@ -17555,7 +17651,7 @@ const AddressUpdateContainer = ({
17555
17651
  const thisAddress = addresses[address];
17556
17652
 
17557
17653
  if (+thisAddress.id === +addressId) {
17558
- const newState = { ...initialState$b,
17654
+ const newState = { ...initialState$c,
17559
17655
  firstName: thisAddress.first_name,
17560
17656
  lastName: thisAddress.last_name,
17561
17657
  line1: thisAddress.line1,
@@ -17688,7 +17784,7 @@ const AddressUpdateContainer = ({
17688
17784
  default:
17689
17785
  return state;
17690
17786
  }
17691
- }, initialState$b);
17787
+ }, initialState$c);
17692
17788
  React.useEffect(() => {
17693
17789
  const getStates = () => {
17694
17790
  dispatch({
@@ -17720,21 +17816,21 @@ const AddressUpdateContainer = ({
17720
17816
  style: { ...style
17721
17817
  },
17722
17818
  className: `pelcro-container pelcro-address-update-container ${className}`
17723
- }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
17819
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
17724
17820
  value: {
17725
17821
  state,
17726
17822
  dispatch
17727
17823
  }
17728
17824
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
17729
- store: store$b,
17825
+ store: store$c,
17730
17826
  key: i
17731
17827
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
17732
- store: store$b
17828
+ store: store$c
17733
17829
  })));
17734
17830
  };
17735
17831
 
17736
17832
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
17737
- store: store$b
17833
+ store: store$c
17738
17834
  }, props));
17739
17835
 
17740
17836
  function AddressUpdateFirstName(props) {
@@ -17744,7 +17840,7 @@ function AddressUpdateFirstName(props) {
17744
17840
  firstName,
17745
17841
  firstNameError
17746
17842
  }
17747
- } = React.useContext(store$b);
17843
+ } = React.useContext(store$c);
17748
17844
 
17749
17845
  const handleBlur = () => {
17750
17846
  return dispatch({
@@ -17787,7 +17883,7 @@ function AddressUpdateLastName(props) {
17787
17883
  lastName,
17788
17884
  lastNameError
17789
17885
  }
17790
- } = React.useContext(store$b);
17886
+ } = React.useContext(store$c);
17791
17887
 
17792
17888
  const handleBlur = () => {
17793
17889
  return dispatch({
@@ -17830,7 +17926,7 @@ function AddressUpdateLine1(props) {
17830
17926
  line1,
17831
17927
  line1Error
17832
17928
  }
17833
- } = React.useContext(store$b);
17929
+ } = React.useContext(store$c);
17834
17930
 
17835
17931
  const handleBlur = () => {
17836
17932
  return dispatch({
@@ -17870,7 +17966,7 @@ const AddressUpdateLine2 = props => {
17870
17966
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
17871
17967
  fieldName: "line2"
17872
17968
  }, props, {
17873
- store: store$b
17969
+ store: store$c
17874
17970
  }));
17875
17971
  };
17876
17972
 
@@ -17881,7 +17977,7 @@ function AddressUpdateCity(props) {
17881
17977
  city,
17882
17978
  cityError
17883
17979
  }
17884
- } = React.useContext(store$b);
17980
+ } = React.useContext(store$c);
17885
17981
 
17886
17982
  const handleBlur = () => {
17887
17983
  return dispatch({
@@ -17924,7 +18020,7 @@ function AddressUpdatePostalCode(props) {
17924
18020
  postalCode,
17925
18021
  postalCodeError
17926
18022
  }
17927
- } = React.useContext(store$b);
18023
+ } = React.useContext(store$c);
17928
18024
 
17929
18025
  const handleBlur = () => {
17930
18026
  return dispatch({
@@ -17970,7 +18066,7 @@ const AddressUpdateSubmit = ({
17970
18066
  state: {
17971
18067
  isSubmitting
17972
18068
  }
17973
- } = React.useContext(store$b);
18069
+ } = React.useContext(store$c);
17974
18070
  const {
17975
18071
  t
17976
18072
  } = useTranslation("address");
@@ -17986,7 +18082,7 @@ const AddressUpdateSubmit = ({
17986
18082
  };
17987
18083
 
17988
18084
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
17989
- store: store$b
18085
+ store: store$c
17990
18086
  }, props));
17991
18087
 
17992
18088
  const AddressUpdateView = props => {
@@ -18069,7 +18165,7 @@ AddressUpdateModal.viewId = "address-edit";
18069
18165
 
18070
18166
  const AddressUpdateTextInput = props => {
18071
18167
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
18072
- store: store$b
18168
+ store: store$c
18073
18169
  }));
18074
18170
  };
18075
18171
 
@@ -18152,7 +18248,7 @@ const PaymentMethodUpdateModal = props => {
18152
18248
  };
18153
18249
  PaymentMethodUpdateModal.viewId = "payment-method-update";
18154
18250
 
18155
- const initialState$a = {
18251
+ const initialState$b = {
18156
18252
  email: "",
18157
18253
  password: "",
18158
18254
  passwordError: null,
@@ -18165,10 +18261,10 @@ const initialState$a = {
18165
18261
  content: ""
18166
18262
  }
18167
18263
  };
18168
- const store$a = /*#__PURE__*/React.createContext(initialState$a);
18264
+ const store$b = /*#__PURE__*/React.createContext(initialState$b);
18169
18265
  const {
18170
- Provider: Provider$a
18171
- } = store$a;
18266
+ Provider: Provider$b
18267
+ } = store$b;
18172
18268
 
18173
18269
  const PasswordResetContainer = ({
18174
18270
  style,
@@ -18225,7 +18321,7 @@ const PasswordResetContainer = ({
18225
18321
  type: SET_EMAIL,
18226
18322
  payload: window.Pelcro.helpers.getURLParameter("email")
18227
18323
  });
18228
- initialState$a.email = window.Pelcro.helpers.getURLParameter("email");
18324
+ initialState$b.email = window.Pelcro.helpers.getURLParameter("email");
18229
18325
  dispatch({
18230
18326
  type: SET_TOKEN,
18231
18327
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -18285,26 +18381,26 @@ const PasswordResetContainer = ({
18285
18381
  default:
18286
18382
  return state;
18287
18383
  }
18288
- }, initialState$a);
18384
+ }, initialState$b);
18289
18385
  return /*#__PURE__*/React__default['default'].createElement("div", {
18290
18386
  style: { ...style
18291
18387
  },
18292
18388
  className: `pelcro-container pelcro-password-reset-container ${className}`
18293
- }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
18389
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
18294
18390
  value: {
18295
18391
  state,
18296
18392
  dispatch
18297
18393
  }
18298
18394
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18299
- store: store$a,
18395
+ store: store$b,
18300
18396
  key: i
18301
18397
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18302
- store: store$a
18398
+ store: store$b
18303
18399
  })));
18304
18400
  };
18305
18401
 
18306
18402
  const PasswordResetPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
18307
- store: store$a
18403
+ store: store$b
18308
18404
  }, props));
18309
18405
 
18310
18406
  const PasswordResetButton = ({
@@ -18317,7 +18413,7 @@ const PasswordResetButton = ({
18317
18413
  buttonDisabled
18318
18414
  },
18319
18415
  dispatch
18320
- } = React.useContext(store$a);
18416
+ } = React.useContext(store$b);
18321
18417
  const {
18322
18418
  t
18323
18419
  } = useTranslation("passwordReset");
@@ -18334,14 +18430,14 @@ const PasswordResetButton = ({
18334
18430
  };
18335
18431
 
18336
18432
  const PasswordResetEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
18337
- store: store$a
18433
+ store: store$b
18338
18434
  }, props, {
18339
18435
  value: window.Pelcro.helpers.getURLParameter("email"),
18340
18436
  disabled: true
18341
18437
  }));
18342
18438
 
18343
18439
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default['default'].createElement(ConfirmPassword, Object.assign({
18344
- store: store$a
18440
+ store: store$b
18345
18441
  }, props));
18346
18442
 
18347
18443
  const PasswordResetView = props => {
@@ -18393,7 +18489,7 @@ const PasswordResetModal = ({
18393
18489
  };
18394
18490
  PasswordResetModal.viewId = "password-reset";
18395
18491
 
18396
- const initialState$9 = {
18492
+ const initialState$a = {
18397
18493
  email: "",
18398
18494
  emailError: null,
18399
18495
  buttonDisabled: false,
@@ -18402,10 +18498,10 @@ const initialState$9 = {
18402
18498
  content: ""
18403
18499
  }
18404
18500
  };
18405
- const store$9 = /*#__PURE__*/React.createContext(initialState$9);
18501
+ const store$a = /*#__PURE__*/React.createContext(initialState$a);
18406
18502
  const {
18407
- Provider: Provider$9
18408
- } = store$9;
18503
+ Provider: Provider$a
18504
+ } = store$a;
18409
18505
 
18410
18506
  const PasswordForgotContainer = ({
18411
18507
  style,
@@ -18483,21 +18579,21 @@ const PasswordForgotContainer = ({
18483
18579
  default:
18484
18580
  return state;
18485
18581
  }
18486
- }, initialState$9);
18582
+ }, initialState$a);
18487
18583
  return /*#__PURE__*/React__default['default'].createElement("div", {
18488
18584
  style: { ...style
18489
18585
  },
18490
18586
  className: `pelcro-container pelcro-password-forgot-container ${className}`
18491
- }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
18587
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
18492
18588
  value: {
18493
18589
  state,
18494
18590
  dispatch
18495
18591
  }
18496
18592
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18497
- store: store$9,
18593
+ store: store$a,
18498
18594
  key: i
18499
18595
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18500
- store: store$9
18596
+ store: store$a
18501
18597
  })));
18502
18598
  };
18503
18599
 
@@ -18513,7 +18609,7 @@ const PasswordForgotButton = ({
18513
18609
  emailError
18514
18610
  },
18515
18611
  dispatch
18516
- } = React.useContext(store$9);
18612
+ } = React.useContext(store$a);
18517
18613
  const {
18518
18614
  t
18519
18615
  } = useTranslation("passwordForgot");
@@ -18534,7 +18630,7 @@ const PasswordForgotButton = ({
18534
18630
  };
18535
18631
 
18536
18632
  const PasswordForgotEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
18537
- store: store$9
18633
+ store: store$a
18538
18634
  }, props));
18539
18635
 
18540
18636
  const PasswordForgotView = props => {
@@ -18584,7 +18680,7 @@ const PasswordForgotModal = ({
18584
18680
  };
18585
18681
  PasswordForgotModal.viewId = "password-forgot";
18586
18682
 
18587
- const initialState$8 = {
18683
+ const initialState$9 = {
18588
18684
  currentPassword: "",
18589
18685
  newPassword: "",
18590
18686
  confirmNewPassword: "",
@@ -18598,10 +18694,10 @@ const initialState$8 = {
18598
18694
  content: ""
18599
18695
  }
18600
18696
  };
18601
- const store$8 = /*#__PURE__*/React.createContext(initialState$8);
18697
+ const store$9 = /*#__PURE__*/React.createContext(initialState$9);
18602
18698
  const {
18603
- Provider: Provider$8
18604
- } = store$8;
18699
+ Provider: Provider$9
18700
+ } = store$9;
18605
18701
  const PasswordChangeContainer = ({
18606
18702
  style,
18607
18703
  className = "",
@@ -18753,21 +18849,21 @@ const PasswordChangeContainer = ({
18753
18849
  default:
18754
18850
  return state;
18755
18851
  }
18756
- }, initialState$8);
18852
+ }, initialState$9);
18757
18853
  return /*#__PURE__*/React__default['default'].createElement("div", {
18758
18854
  style: { ...style
18759
18855
  },
18760
18856
  className: `pelcro-container pelcro-password-change-container ${className}`
18761
- }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
18857
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
18762
18858
  value: {
18763
18859
  state,
18764
18860
  dispatch
18765
18861
  }
18766
18862
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18767
- store: store$8,
18863
+ store: store$9,
18768
18864
  key: i
18769
18865
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18770
- store: store$8
18866
+ store: store$9
18771
18867
  })));
18772
18868
  };
18773
18869
 
@@ -18778,7 +18874,7 @@ function PasswordChangeCurrentPassword(props) {
18778
18874
  currentPassword,
18779
18875
  currentPasswordError
18780
18876
  }
18781
- } = React.useContext(store$8);
18877
+ } = React.useContext(store$9);
18782
18878
  const handleBlur = React.useCallback(() => {
18783
18879
  return dispatch({
18784
18880
  type: VALIDATE_PASSWORD
@@ -18812,7 +18908,7 @@ function PasswordChangeNewPassword(props) {
18812
18908
  newPassword,
18813
18909
  newPasswordError
18814
18910
  }
18815
- } = React.useContext(store$8);
18911
+ } = React.useContext(store$9);
18816
18912
  const handleBlur = React.useCallback(() => {
18817
18913
  return dispatch({
18818
18914
  type: VALIDATE_NEW_PASSWORD
@@ -18846,7 +18942,7 @@ function PasswordChangeConfirmNewPassword(props) {
18846
18942
  confirmNewPassword,
18847
18943
  confirmNewPasswordError
18848
18944
  }
18849
- } = React.useContext(store$8);
18945
+ } = React.useContext(store$9);
18850
18946
  const handleBlur = React.useCallback(() => {
18851
18947
  return dispatch({
18852
18948
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -18887,7 +18983,7 @@ const PasswordChangeButton = ({
18887
18983
  confirmNewPasswordError
18888
18984
  },
18889
18985
  dispatch
18890
- } = React.useContext(store$8);
18986
+ } = React.useContext(store$9);
18891
18987
  const {
18892
18988
  t
18893
18989
  } = useTranslation("passwordChange");
@@ -18953,17 +19049,17 @@ const PasswordChangeModal = ({
18953
19049
  };
18954
19050
  PasswordChangeModal.viewId = "password-change";
18955
19051
 
18956
- const initialState$7 = {
19052
+ const initialState$8 = {
18957
19053
  buttonDisabled: false,
18958
19054
  alert: {
18959
19055
  type: "error",
18960
19056
  content: ""
18961
19057
  }
18962
19058
  };
18963
- const store$7 = /*#__PURE__*/React.createContext(initialState$7);
19059
+ const store$8 = /*#__PURE__*/React.createContext(initialState$8);
18964
19060
  const {
18965
- Provider: Provider$7
18966
- } = store$7;
19061
+ Provider: Provider$8
19062
+ } = store$8;
18967
19063
 
18968
19064
  const CartContainer = ({
18969
19065
  style,
@@ -19054,21 +19150,21 @@ const CartContainer = ({
19054
19150
  default:
19055
19151
  return state;
19056
19152
  }
19057
- }, initialState$7);
19153
+ }, initialState$8);
19058
19154
  return /*#__PURE__*/React__default['default'].createElement("div", {
19059
19155
  style: { ...style
19060
19156
  },
19061
19157
  className: `pelcro-container pelcro-cart-container ${className}`
19062
- }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
19158
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
19063
19159
  value: {
19064
19160
  state,
19065
19161
  dispatch
19066
19162
  }
19067
19163
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19068
- store: store$7,
19164
+ store: store$8,
19069
19165
  key: i
19070
19166
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19071
- store: store$7
19167
+ store: store$8
19072
19168
  })));
19073
19169
  };
19074
19170
 
@@ -19105,7 +19201,7 @@ const CartSubmit = ({
19105
19201
  buttonDisabled
19106
19202
  },
19107
19203
  dispatch
19108
- } = React.useContext(store$7);
19204
+ } = React.useContext(store$8);
19109
19205
  const {
19110
19206
  t
19111
19207
  } = useTranslation("cart");
@@ -19136,7 +19232,7 @@ const CartTotalPrice = () => {
19136
19232
  state: {
19137
19233
  alert
19138
19234
  }
19139
- } = React.useContext(store$7);
19235
+ } = React.useContext(store$8);
19140
19236
  const {
19141
19237
  cartItems
19142
19238
  } = usePelcro();
@@ -19449,7 +19545,7 @@ const OrderConfirmModal = props => {
19449
19545
  };
19450
19546
  OrderConfirmModal.viewId = "order-confirm";
19451
19547
 
19452
- const initialState$6 = {
19548
+ const initialState$7 = {
19453
19549
  email: "",
19454
19550
  firstName: "",
19455
19551
  lastName: "",
@@ -19461,10 +19557,10 @@ const initialState$6 = {
19461
19557
  content: ""
19462
19558
  }
19463
19559
  };
19464
- const store$6 = /*#__PURE__*/React.createContext(initialState$6);
19560
+ const store$7 = /*#__PURE__*/React.createContext(initialState$7);
19465
19561
  const {
19466
- Provider: Provider$6
19467
- } = store$6;
19562
+ Provider: Provider$7
19563
+ } = store$7;
19468
19564
 
19469
19565
  const GiftCreateContainer = ({
19470
19566
  style,
@@ -19568,21 +19664,21 @@ const GiftCreateContainer = ({
19568
19664
  default:
19569
19665
  return state;
19570
19666
  }
19571
- }, initialState$6);
19667
+ }, initialState$7);
19572
19668
  return /*#__PURE__*/React__default['default'].createElement("div", {
19573
19669
  style: { ...style
19574
19670
  },
19575
19671
  className: `pelcro-container pelcro-gift-create-container ${className}`
19576
- }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
19672
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
19577
19673
  value: {
19578
19674
  state,
19579
19675
  dispatch
19580
19676
  }
19581
19677
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19582
- store: store$6,
19678
+ store: store$7,
19583
19679
  key: i
19584
19680
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19585
- store: store$6
19681
+ store: store$7
19586
19682
  })));
19587
19683
  };
19588
19684
 
@@ -19596,7 +19692,7 @@ const GiftCreateSubmitButton = ({
19596
19692
  state: {
19597
19693
  disableSubmit
19598
19694
  }
19599
- } = React.useContext(store$6);
19695
+ } = React.useContext(store$7);
19600
19696
  const {
19601
19697
  t
19602
19698
  } = useTranslation("register");
@@ -19613,29 +19709,29 @@ const GiftCreateSubmitButton = ({
19613
19709
 
19614
19710
  const GiftCreateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
19615
19711
  initWithUserEmail: false,
19616
- store: store$6
19712
+ store: store$7
19617
19713
  }, props));
19618
19714
 
19619
19715
  const GiftCreateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
19620
- store: store$6
19716
+ store: store$7
19621
19717
  }, props));
19622
19718
 
19623
19719
  const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
19624
- store: store$6
19720
+ store: store$7
19625
19721
  }, props));
19626
19722
 
19627
- var _path$h;
19723
+ var _path$i;
19628
19724
 
19629
- 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); }
19725
+ 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); }
19630
19726
 
19631
19727
  function SvgInfoCircle(props) {
19632
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
19728
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
19633
19729
  xmlns: "http://www.w3.org/2000/svg",
19634
19730
  className: "plc-w-5 plc-h-5",
19635
19731
  fill: "none",
19636
19732
  viewBox: "0 0 24 24",
19637
19733
  stroke: "currentColor"
19638
- }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
19734
+ }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
19639
19735
  strokeLinecap: "round",
19640
19736
  strokeLinejoin: "round",
19641
19737
  strokeWidth: 2,
@@ -19706,7 +19802,7 @@ const GiftCreateStartDate = props => {
19706
19802
  const {
19707
19803
  dispatch,
19708
19804
  state
19709
- } = React.useContext(store$6);
19805
+ } = React.useContext(store$7);
19710
19806
 
19711
19807
  const handleInputChange = value => {
19712
19808
  dispatch({
@@ -19779,7 +19875,7 @@ function GiftCreateMessage(props) {
19779
19875
  const {
19780
19876
  dispatch,
19781
19877
  state
19782
- } = React.useContext(store$6);
19878
+ } = React.useContext(store$7);
19783
19879
  const MAX_CHARS_COUNT = 200;
19784
19880
  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;
19785
19881
 
@@ -19903,7 +19999,7 @@ const GiftCreateModal = ({
19903
19999
  };
19904
20000
  GiftCreateModal.viewId = "gift-create";
19905
20001
 
19906
- const initialState$5 = {
20002
+ const initialState$6 = {
19907
20003
  giftCode: "",
19908
20004
  buttonDisabled: true,
19909
20005
  alert: {
@@ -19911,10 +20007,10 @@ const initialState$5 = {
19911
20007
  content: ""
19912
20008
  }
19913
20009
  };
19914
- const store$5 = /*#__PURE__*/React.createContext(initialState$5);
20010
+ const store$6 = /*#__PURE__*/React.createContext(initialState$6);
19915
20011
  const {
19916
- Provider: Provider$5
19917
- } = store$5;
20012
+ Provider: Provider$6
20013
+ } = store$6;
19918
20014
 
19919
20015
  const GiftRedeemContainer = ({
19920
20016
  style,
@@ -19979,21 +20075,21 @@ const GiftRedeemContainer = ({
19979
20075
  default:
19980
20076
  return state;
19981
20077
  }
19982
- }, initialState$5);
20078
+ }, initialState$6);
19983
20079
  return /*#__PURE__*/React__default['default'].createElement("div", {
19984
20080
  style: { ...style
19985
20081
  },
19986
20082
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
19987
- }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
20083
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
19988
20084
  value: {
19989
20085
  state,
19990
20086
  dispatch
19991
20087
  }
19992
20088
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19993
- store: store$5,
20089
+ store: store$6,
19994
20090
  key: i
19995
20091
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19996
- store: store$5
20092
+ store: store$6
19997
20093
  })));
19998
20094
  };
19999
20095
 
@@ -20030,7 +20126,7 @@ function GiftCode({
20030
20126
  }
20031
20127
 
20032
20128
  const GiftRedeemCode = props => /*#__PURE__*/React__default['default'].createElement(GiftCode, Object.assign({
20033
- store: store$5
20129
+ store: store$6
20034
20130
  }, props));
20035
20131
 
20036
20132
  const GiftRedeemSubmitButton = ({
@@ -20043,7 +20139,7 @@ const GiftRedeemSubmitButton = ({
20043
20139
  state: {
20044
20140
  disableSubmit
20045
20141
  }
20046
- } = React.useContext(store$5);
20142
+ } = React.useContext(store$6);
20047
20143
  const {
20048
20144
  t
20049
20145
  } = useTranslation("register");
@@ -20136,7 +20232,7 @@ const moveDefaultAddressToStart = addresses => {
20136
20232
  return [defaultAddress, ...addressesWithoutDefault];
20137
20233
  };
20138
20234
 
20139
- const initialState$4 = {
20235
+ const initialState$5 = {
20140
20236
  addresses: [],
20141
20237
  selectedAddressId: null,
20142
20238
  isSubmitting: false,
@@ -20145,10 +20241,10 @@ const initialState$4 = {
20145
20241
  content: ""
20146
20242
  }
20147
20243
  };
20148
- const store$4 = /*#__PURE__*/React.createContext(initialState$4);
20244
+ const store$5 = /*#__PURE__*/React.createContext(initialState$5);
20149
20245
  const {
20150
- Provider: Provider$4
20151
- } = store$4;
20246
+ Provider: Provider$5
20247
+ } = store$5;
20152
20248
 
20153
20249
  const AddressSelectContainer = ({
20154
20250
  style,
@@ -20243,7 +20339,7 @@ const AddressSelectContainer = ({
20243
20339
  default:
20244
20340
  return state;
20245
20341
  }
20246
- }, initialState$4);
20342
+ }, initialState$5);
20247
20343
  React.useEffect(() => {
20248
20344
  var _window$Pelcro$user$r;
20249
20345
 
@@ -20256,16 +20352,16 @@ const AddressSelectContainer = ({
20256
20352
  style: { ...style
20257
20353
  },
20258
20354
  className: `pelcro-container pelcro-address-select-container ${className}`
20259
- }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
20355
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
20260
20356
  value: {
20261
20357
  state,
20262
20358
  dispatch
20263
20359
  }
20264
20360
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
20265
- store: store$4,
20361
+ store: store$5,
20266
20362
  key: i
20267
20363
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
20268
- store: store$4
20364
+ store: store$5
20269
20365
  })));
20270
20366
  };
20271
20367
 
@@ -20276,7 +20372,7 @@ const AddressSelectList = () => {
20276
20372
  addresses,
20277
20373
  selectedAddressId
20278
20374
  }
20279
- } = React.useContext(store$4);
20375
+ } = React.useContext(store$5);
20280
20376
 
20281
20377
  const handleAddressSelect = event => {
20282
20378
  dispatch({
@@ -20320,7 +20416,7 @@ const AddressSelectSubmit = ({
20320
20416
  selectedAddressId,
20321
20417
  isSubmitting
20322
20418
  }
20323
- } = React.useContext(store$4);
20419
+ } = React.useContext(store$5);
20324
20420
  const {
20325
20421
  t
20326
20422
  } = useTranslation("address");
@@ -20416,7 +20512,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
20416
20512
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
20417
20513
  };
20418
20514
 
20419
- const initialState$3 = {
20515
+ const initialState$4 = {
20420
20516
  paymentMethods: [],
20421
20517
  selectedPaymentMethodId: null,
20422
20518
  isSubmitting: false,
@@ -20425,10 +20521,10 @@ const initialState$3 = {
20425
20521
  content: ""
20426
20522
  }
20427
20523
  };
20428
- const store$3 = /*#__PURE__*/React.createContext(initialState$3);
20524
+ const store$4 = /*#__PURE__*/React.createContext(initialState$4);
20429
20525
  const {
20430
- Provider: Provider$3
20431
- } = store$3;
20526
+ Provider: Provider$4
20527
+ } = store$4;
20432
20528
 
20433
20529
  const PaymentMethodSelectContainer = ({
20434
20530
  style,
@@ -20487,7 +20583,7 @@ const PaymentMethodSelectContainer = ({
20487
20583
  default:
20488
20584
  return state;
20489
20585
  }
20490
- }, initialState$3);
20586
+ }, initialState$4);
20491
20587
  React.useEffect(() => {
20492
20588
  var _window$Pelcro$user$r3;
20493
20589
 
@@ -20500,16 +20596,16 @@ const PaymentMethodSelectContainer = ({
20500
20596
  style: { ...style
20501
20597
  },
20502
20598
  className: `pelcro-container pelcro-payment-select-container ${className}`
20503
- }, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
20599
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
20504
20600
  value: {
20505
20601
  state,
20506
20602
  dispatch
20507
20603
  }
20508
20604
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
20509
- store: store$3,
20605
+ store: store$4,
20510
20606
  key: i
20511
20607
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
20512
- store: store$3
20608
+ store: store$4
20513
20609
  })));
20514
20610
  };
20515
20611
 
@@ -20523,7 +20619,7 @@ const PaymentMethodSelectList = () => {
20523
20619
  paymentMethods,
20524
20620
  selectedPaymentMethodId
20525
20621
  }
20526
- } = React.useContext(store$3);
20622
+ } = React.useContext(store$4);
20527
20623
 
20528
20624
  const handlePaymentMethodSelect = event => {
20529
20625
  dispatch({
@@ -20573,7 +20669,7 @@ const PaymentMethodSelectSubmit = ({
20573
20669
  selectedPaymentMethodId,
20574
20670
  isSubmitting
20575
20671
  }
20576
- } = React.useContext(store$3);
20672
+ } = React.useContext(store$4);
20577
20673
  return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
20578
20674
  onClick: () => {
20579
20675
  dispatch({
@@ -20647,8 +20743,8 @@ const PaymentMethodSelectModal = ({
20647
20743
  };
20648
20744
  PaymentMethodSelectModal.viewId = "payment-method-select";
20649
20745
 
20650
- function _extends$i() {
20651
- _extends$i = Object.assign || function (target) {
20746
+ function _extends$j() {
20747
+ _extends$j = Object.assign || function (target) {
20652
20748
  for (var i = 1; i < arguments.length; i++) {
20653
20749
  var source = arguments[i];
20654
20750
 
@@ -20662,7 +20758,7 @@ function _extends$i() {
20662
20758
  return target;
20663
20759
  };
20664
20760
 
20665
- return _extends$i.apply(this, arguments);
20761
+ return _extends$j.apply(this, arguments);
20666
20762
  }
20667
20763
 
20668
20764
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -20846,7 +20942,7 @@ function render(props, propsBag, defaultTag, features, visible) {
20846
20942
  return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
20847
20943
  return null;
20848
20944
  }, _match[RenderStrategy.Hidden] = function () {
20849
- return _render(_extends$i({}, _rest, {
20945
+ return _render(_extends$j({}, _rest, {
20850
20946
  hidden: true,
20851
20947
  style: {
20852
20948
  display: 'none'
@@ -21374,7 +21470,7 @@ function TransitionChild(props) {
21374
21470
  var passthroughProps = rest;
21375
21471
  return React__default['default'].createElement(NestingContext.Provider, {
21376
21472
  value: nesting
21377
- }, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
21473
+ }, render(_extends$j({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
21378
21474
  }
21379
21475
 
21380
21476
  function Transition(props) {
@@ -21418,7 +21514,7 @@ function Transition(props) {
21418
21514
  value: nestingBag
21419
21515
  }, React__default['default'].createElement(TransitionContext.Provider, {
21420
21516
  value: transitionBag
21421
- }, render(_extends$i({}, sharedProps, {
21517
+ }, render(_extends$j({}, sharedProps, {
21422
21518
  as: React.Fragment,
21423
21519
  children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
21424
21520
  }), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
@@ -21545,12 +21641,12 @@ var ActionTypes;
21545
21641
  })(ActionTypes || (ActionTypes = {}));
21546
21642
 
21547
21643
  (_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
21548
- return _extends$i({}, state, {
21644
+ return _extends$j({}, state, {
21549
21645
  activeItemIndex: null,
21550
21646
  menuState: MenuStates.Closed
21551
21647
  });
21552
21648
  }, _reducers[ActionTypes.OpenMenu] = function (state) {
21553
- return _extends$i({}, state, {
21649
+ return _extends$j({}, state, {
21554
21650
  menuState: MenuStates.Open
21555
21651
  });
21556
21652
  }, _reducers[ActionTypes.GoToItem] = function (state, action) {
@@ -21569,7 +21665,7 @@ var ActionTypes;
21569
21665
  }
21570
21666
  });
21571
21667
  if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
21572
- return _extends$i({}, state, {
21668
+ return _extends$j({}, state, {
21573
21669
  searchQuery: '',
21574
21670
  activeItemIndex: activeItemIndex
21575
21671
  });
@@ -21580,19 +21676,19 @@ var ActionTypes;
21580
21676
 
21581
21677
  return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
21582
21678
  });
21583
- if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
21679
+ if (match === -1 || match === state.activeItemIndex) return _extends$j({}, state, {
21584
21680
  searchQuery: searchQuery
21585
21681
  });
21586
- return _extends$i({}, state, {
21682
+ return _extends$j({}, state, {
21587
21683
  searchQuery: searchQuery,
21588
21684
  activeItemIndex: match
21589
21685
  });
21590
21686
  }, _reducers[ActionTypes.ClearSearch] = function (state) {
21591
- return _extends$i({}, state, {
21687
+ return _extends$j({}, state, {
21592
21688
  searchQuery: ''
21593
21689
  });
21594
21690
  }, _reducers[ActionTypes.RegisterItem] = function (state, action) {
21595
- return _extends$i({}, state, {
21691
+ return _extends$j({}, state, {
21596
21692
  items: [].concat(state.items, [{
21597
21693
  id: action.id,
21598
21694
  dataRef: action.dataRef
@@ -21605,7 +21701,7 @@ var ActionTypes;
21605
21701
  return a.id === action.id;
21606
21702
  });
21607
21703
  if (idx !== -1) nextItems.splice(idx, 1);
21608
- return _extends$i({}, state, {
21704
+ return _extends$j({}, state, {
21609
21705
  items: nextItems,
21610
21706
  activeItemIndex: function () {
21611
21707
  if (idx === state.activeItemIndex) return null;
@@ -21644,19 +21740,19 @@ var ActionTypes$1;
21644
21740
  (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
21645
21741
  if (state.disabled) return state;
21646
21742
  if (state.listboxState === ListboxStates.Closed) return state;
21647
- return _extends$i({}, state, {
21743
+ return _extends$j({}, state, {
21648
21744
  activeOptionIndex: null,
21649
21745
  listboxState: ListboxStates.Closed
21650
21746
  });
21651
21747
  }, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
21652
21748
  if (state.disabled) return state;
21653
21749
  if (state.listboxState === ListboxStates.Open) return state;
21654
- return _extends$i({}, state, {
21750
+ return _extends$j({}, state, {
21655
21751
  listboxState: ListboxStates.Open
21656
21752
  });
21657
21753
  }, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
21658
21754
  if (state.disabled === action.disabled) return state;
21659
- return _extends$i({}, state, {
21755
+ return _extends$j({}, state, {
21660
21756
  disabled: action.disabled
21661
21757
  });
21662
21758
  }, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
@@ -21677,7 +21773,7 @@ var ActionTypes$1;
21677
21773
  }
21678
21774
  });
21679
21775
  if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
21680
- return _extends$i({}, state, {
21776
+ return _extends$j({}, state, {
21681
21777
  searchQuery: '',
21682
21778
  activeOptionIndex: activeOptionIndex
21683
21779
  });
@@ -21690,10 +21786,10 @@ var ActionTypes$1;
21690
21786
 
21691
21787
  return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
21692
21788
  });
21693
- if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
21789
+ if (match === -1 || match === state.activeOptionIndex) return _extends$j({}, state, {
21694
21790
  searchQuery: searchQuery
21695
21791
  });
21696
- return _extends$i({}, state, {
21792
+ return _extends$j({}, state, {
21697
21793
  searchQuery: searchQuery,
21698
21794
  activeOptionIndex: match
21699
21795
  });
@@ -21701,11 +21797,11 @@ var ActionTypes$1;
21701
21797
  if (state.disabled) return state;
21702
21798
  if (state.listboxState === ListboxStates.Closed) return state;
21703
21799
  if (state.searchQuery === '') return state;
21704
- return _extends$i({}, state, {
21800
+ return _extends$j({}, state, {
21705
21801
  searchQuery: ''
21706
21802
  });
21707
21803
  }, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
21708
- return _extends$i({}, state, {
21804
+ return _extends$j({}, state, {
21709
21805
  options: [].concat(state.options, [{
21710
21806
  id: action.id,
21711
21807
  dataRef: action.dataRef
@@ -21718,7 +21814,7 @@ var ActionTypes$1;
21718
21814
  return a.id === action.id;
21719
21815
  });
21720
21816
  if (idx !== -1) nextOptions.splice(idx, 1);
21721
- return _extends$i({}, state, {
21817
+ return _extends$j({}, state, {
21722
21818
  options: nextOptions,
21723
21819
  activeOptionIndex: function () {
21724
21820
  if (idx === state.activeOptionIndex) return null;
@@ -21779,18 +21875,18 @@ const getPaymentCardIcon = name => {
21779
21875
  }));
21780
21876
  };
21781
21877
 
21782
- var _path$g;
21878
+ var _path$h;
21783
21879
 
21784
- 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); }
21880
+ 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); }
21785
21881
 
21786
21882
  function SvgChevronRight(props) {
21787
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
21883
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
21788
21884
  className: "plc-w-6 plc-h-6",
21789
21885
  xmlns: "http://www.w3.org/2000/svg",
21790
21886
  fill: "none",
21791
21887
  viewBox: "0 0 24 24",
21792
21888
  stroke: "currentColor"
21793
- }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
21889
+ }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
21794
21890
  strokeLinecap: "round",
21795
21891
  strokeLinejoin: "round",
21796
21892
  strokeWidth: 2,
@@ -22006,18 +22102,18 @@ const SavedItems = ({
22006
22102
  });
22007
22103
  };
22008
22104
 
22009
- var _path$f;
22105
+ var _path$g;
22010
22106
 
22011
- 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); }
22107
+ 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); }
22012
22108
 
22013
22109
  function SvgRefresh(props) {
22014
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
22110
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
22015
22111
  className: "plc-w-4 plc-h-4 plc-mr-1",
22016
22112
  xmlns: "http://www.w3.org/2000/svg",
22017
22113
  fill: "none",
22018
22114
  viewBox: "0 0 24 24",
22019
22115
  stroke: "currentColor"
22020
- }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
22116
+ }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
22021
22117
  strokeLinecap: "round",
22022
22118
  strokeLinejoin: "round",
22023
22119
  strokeWidth: 2,
@@ -22025,35 +22121,35 @@ function SvgRefresh(props) {
22025
22121
  })));
22026
22122
  }
22027
22123
 
22028
- var _path$e;
22124
+ var _path$f;
22029
22125
 
22030
- 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); }
22126
+ 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); }
22031
22127
 
22032
22128
  function SvgCalendar(props) {
22033
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
22129
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
22034
22130
  xmlns: "http://www.w3.org/2000/svg",
22035
22131
  className: "plc-h-4 plc-w-4 plc-mr-1",
22036
22132
  viewBox: "0 0 20 20",
22037
22133
  fill: "currentColor"
22038
- }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
22134
+ }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
22039
22135
  fillRule: "evenodd",
22040
22136
  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",
22041
22137
  clipRule: "evenodd"
22042
22138
  })));
22043
22139
  }
22044
22140
 
22045
- var _path$d;
22141
+ var _path$e;
22046
22142
 
22047
- 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); }
22143
+ 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); }
22048
22144
 
22049
22145
  function SvgPlus(props) {
22050
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
22146
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
22051
22147
  className: "plc-w-5 plc-h-5",
22052
22148
  xmlns: "http://www.w3.org/2000/svg",
22053
22149
  fill: "none",
22054
22150
  viewBox: "0 0 24 24",
22055
22151
  stroke: "currentColor"
22056
- }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
22152
+ }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
22057
22153
  strokeLinecap: "round",
22058
22154
  strokeLinejoin: "round",
22059
22155
  strokeWidth: 2,
@@ -22061,17 +22157,17 @@ function SvgPlus(props) {
22061
22157
  })));
22062
22158
  }
22063
22159
 
22064
- var _path$c;
22160
+ var _path$d;
22065
22161
 
22066
- 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); }
22162
+ 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); }
22067
22163
 
22068
22164
  function SvgCheckMark(props) {
22069
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
22165
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
22070
22166
  className: "plc-w-4 plc-h-4 plc-mr-1",
22071
22167
  xmlns: "http://www.w3.org/2000/svg",
22072
22168
  viewBox: "0 0 20 20",
22073
22169
  fill: "currentColor"
22074
- }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
22170
+ }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
22075
22171
  fillRule: "evenodd",
22076
22172
  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",
22077
22173
  clipRule: "evenodd"
@@ -22135,7 +22231,8 @@ const SubscriptionsItems = ({
22135
22231
  } = useTranslation("dashboard");
22136
22232
  const {
22137
22233
  switchView,
22138
- isAuthenticated
22234
+ switchToAddressView,
22235
+ switchToPaymentView
22139
22236
  } = usePelcro();
22140
22237
  const subs = getNonDonationSubs();
22141
22238
  if (subs.length === 0) return null;
@@ -22177,7 +22274,12 @@ const SubscriptionsItems = ({
22177
22274
  const plan = window.Pelcro.plan.getById(plan_id);
22178
22275
  setProductAndPlan(product, plan);
22179
22276
  setSubscriptionIdToRenew(sub.id);
22180
- setView("plan-select");
22277
+
22278
+ if (product.address_required) {
22279
+ return switchToAddressView();
22280
+ }
22281
+
22282
+ return switchToPaymentView();
22181
22283
  };
22182
22284
 
22183
22285
  const getPhases = () => {
@@ -22366,18 +22468,18 @@ Accordion.item = function AccordionItem({
22366
22468
  }, content)) : null;
22367
22469
  };
22368
22470
 
22369
- var _path$b;
22471
+ var _path$c;
22370
22472
 
22371
- 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); }
22473
+ 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); }
22372
22474
 
22373
22475
  function SvgExit(props) {
22374
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
22476
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
22375
22477
  className: "plc-w-6 plc-h-6",
22376
22478
  xmlns: "http://www.w3.org/2000/svg",
22377
22479
  fill: "none",
22378
22480
  viewBox: "0 0 24 24",
22379
22481
  stroke: "currentColor"
22380
- }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
22482
+ }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
22381
22483
  strokeLinecap: "round",
22382
22484
  strokeLinejoin: "round",
22383
22485
  strokeWidth: 2,
@@ -22385,17 +22487,17 @@ function SvgExit(props) {
22385
22487
  })));
22386
22488
  }
22387
22489
 
22388
- var _path$a;
22490
+ var _path$b;
22389
22491
 
22390
- 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); }
22492
+ 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); }
22391
22493
 
22392
22494
  function SvgUser(props) {
22393
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
22495
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
22394
22496
  xmlns: "http://www.w3.org/2000/svg",
22395
22497
  fill: "none",
22396
22498
  viewBox: "0 0 24 24",
22397
22499
  stroke: "currentColor"
22398
- }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
22500
+ }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
22399
22501
  strokeLinecap: "round",
22400
22502
  strokeLinejoin: "round",
22401
22503
  strokeWidth: 2,
@@ -22403,18 +22505,18 @@ function SvgUser(props) {
22403
22505
  })));
22404
22506
  }
22405
22507
 
22406
- var _path$9;
22508
+ var _path$a;
22407
22509
 
22408
- 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); }
22510
+ 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); }
22409
22511
 
22410
22512
  function SvgNewsletter(props) {
22411
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
22513
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
22412
22514
  xmlns: "http://www.w3.org/2000/svg",
22413
22515
  className: "plc-h-5 plc-w-5",
22414
22516
  fill: "none",
22415
22517
  viewBox: "0 0 24 24",
22416
22518
  stroke: "currentColor"
22417
- }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
22519
+ }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
22418
22520
  strokeLinecap: "round",
22419
22521
  strokeLinejoin: "round",
22420
22522
  strokeWidth: 2,
@@ -22422,18 +22524,18 @@ function SvgNewsletter(props) {
22422
22524
  })));
22423
22525
  }
22424
22526
 
22425
- var _path$8;
22527
+ var _path$9;
22426
22528
 
22427
- 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); }
22529
+ 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); }
22428
22530
 
22429
22531
  function SvgDocument(props) {
22430
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
22532
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
22431
22533
  xmlns: "http://www.w3.org/2000/svg",
22432
22534
  className: "plc-h-6 plc-w-6 plc-mr-2",
22433
22535
  fill: "none",
22434
22536
  viewBox: "0 0 24 24",
22435
22537
  stroke: "currentColor"
22436
- }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
22538
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
22437
22539
  strokeLinecap: "round",
22438
22540
  strokeLinejoin: "round",
22439
22541
  strokeWidth: 2,
@@ -22441,18 +22543,18 @@ function SvgDocument(props) {
22441
22543
  })));
22442
22544
  }
22443
22545
 
22444
- var _path$7;
22546
+ var _path$8;
22445
22547
 
22446
- 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); }
22548
+ 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); }
22447
22549
 
22448
22550
  function SvgPaymentCard(props) {
22449
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
22551
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
22450
22552
  className: "plc-w-6 plc-h-6 plc-mr-2",
22451
22553
  xmlns: "http://www.w3.org/2000/svg",
22452
22554
  fill: "none",
22453
22555
  viewBox: "0 0 24 24",
22454
22556
  stroke: "currentColor"
22455
- }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
22557
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
22456
22558
  strokeLinecap: "round",
22457
22559
  strokeLinejoin: "round",
22458
22560
  strokeWidth: 2,
@@ -22460,18 +22562,18 @@ function SvgPaymentCard(props) {
22460
22562
  })));
22461
22563
  }
22462
22564
 
22463
- var _path$6, _path2$1;
22565
+ var _path$7, _path2$1;
22464
22566
 
22465
- 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); }
22567
+ 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); }
22466
22568
 
22467
22569
  function SvgLocationPin(props) {
22468
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
22570
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
22469
22571
  className: "plc-w-6 plc-h-6 plc-mr-2",
22470
22572
  xmlns: "http://www.w3.org/2000/svg",
22471
22573
  fill: "none",
22472
22574
  viewBox: "0 0 24 24",
22473
22575
  stroke: "currentColor"
22474
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
22576
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
22475
22577
  strokeLinecap: "round",
22476
22578
  strokeLinejoin: "round",
22477
22579
  strokeWidth: 2,
@@ -22486,10 +22588,10 @@ function SvgLocationPin(props) {
22486
22588
 
22487
22589
  var _switch;
22488
22590
 
22489
- 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); }
22591
+ 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); }
22490
22592
 
22491
22593
  function SvgSubscription(props) {
22492
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
22594
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
22493
22595
  xmlns: "http://www.w3.org/2000/svg",
22494
22596
  viewBox: "0 0 100 125",
22495
22597
  fill: "currentColor"
@@ -22504,18 +22606,18 @@ function SvgSubscription(props) {
22504
22606
  }))))));
22505
22607
  }
22506
22608
 
22507
- var _path$5;
22609
+ var _path$6;
22508
22610
 
22509
- 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); }
22611
+ 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); }
22510
22612
 
22511
22613
  function SvgShopping(props) {
22512
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
22614
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
22513
22615
  className: "plc-w-6 plc-h-6 plc-mr-2",
22514
22616
  xmlns: "http://www.w3.org/2000/svg",
22515
22617
  fill: "none",
22516
22618
  viewBox: "0 0 24 24",
22517
22619
  stroke: "currentColor"
22518
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
22620
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
22519
22621
  strokeLinecap: "round",
22520
22622
  strokeLinejoin: "round",
22521
22623
  strokeWidth: 2,
@@ -22523,18 +22625,18 @@ function SvgShopping(props) {
22523
22625
  })));
22524
22626
  }
22525
22627
 
22526
- var _path$4;
22628
+ var _path$5;
22527
22629
 
22528
- 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); }
22630
+ 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); }
22529
22631
 
22530
22632
  function SvgBookmark(props) {
22531
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
22633
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
22532
22634
  className: "plc-w-6 plc-h-6 plc-mr-2",
22533
22635
  xmlns: "http://www.w3.org/2000/svg",
22534
22636
  fill: "none",
22535
22637
  viewBox: "0 0 24 24",
22536
22638
  stroke: "currentColor"
22537
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
22639
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
22538
22640
  strokeLinecap: "round",
22539
22641
  strokeLinejoin: "round",
22540
22642
  strokeWidth: 2,
@@ -22542,33 +22644,33 @@ function SvgBookmark(props) {
22542
22644
  })));
22543
22645
  }
22544
22646
 
22545
- var _path$3;
22647
+ var _path$4;
22546
22648
 
22547
- 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); }
22649
+ 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); }
22548
22650
 
22549
22651
  function SvgKey(props) {
22550
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
22652
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
22551
22653
  xmlns: "http://www.w3.org/2000/svg",
22552
22654
  viewBox: "0 0 20 20",
22553
22655
  fill: "currentColor"
22554
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
22656
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
22555
22657
  fillRule: "evenodd",
22556
22658
  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",
22557
22659
  clipRule: "evenodd"
22558
22660
  })));
22559
22661
  }
22560
22662
 
22561
- var _path$2;
22663
+ var _path$3;
22562
22664
 
22563
- 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); }
22665
+ 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); }
22564
22666
 
22565
22667
  function SvgDonate(props) {
22566
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
22668
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
22567
22669
  width: 24,
22568
22670
  height: 24,
22569
22671
  fill: "currentColor",
22570
22672
  xmlns: "http://www.w3.org/2000/svg"
22571
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
22673
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
22572
22674
  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"
22573
22675
  })));
22574
22676
  }
@@ -22895,9 +22997,10 @@ class Dashboard extends React.Component {
22895
22997
  }) => {
22896
22998
  if (isGift) {
22897
22999
  this.props.setProductAndPlan(null, null, true);
23000
+ return this.props.setView("plan-select");
22898
23001
  }
22899
23002
 
22900
- return this.props.setView("plan-select");
23003
+ return this.props.setView("subscription-options");
22901
23004
  });
22902
23005
 
22903
23006
  _defineProperty$3(this, "displayAddressCreate", () => {
@@ -23365,7 +23468,7 @@ const DashboardOpenButton = () => {
23365
23468
  };
23366
23469
  DashboardOpenButton.viewId = "dashboard-open";
23367
23470
 
23368
- const initialState$2 = {
23471
+ const initialState$3 = {
23369
23472
  imageSrc: null,
23370
23473
  crop: {
23371
23474
  x: 0,
@@ -23379,10 +23482,10 @@ const initialState$2 = {
23379
23482
  content: ""
23380
23483
  }
23381
23484
  };
23382
- const store$2 = /*#__PURE__*/React.createContext(initialState$2);
23485
+ const store$3 = /*#__PURE__*/React.createContext(initialState$3);
23383
23486
  const {
23384
- Provider: Provider$2
23385
- } = store$2;
23487
+ Provider: Provider$3
23488
+ } = store$3;
23386
23489
 
23387
23490
  const ProfilePicChangeContainer = ({
23388
23491
  style,
@@ -23516,21 +23619,21 @@ const ProfilePicChangeContainer = ({
23516
23619
  default:
23517
23620
  return state;
23518
23621
  }
23519
- }, initialState$2);
23622
+ }, initialState$3);
23520
23623
  return /*#__PURE__*/React__default['default'].createElement("div", {
23521
23624
  style: { ...style
23522
23625
  },
23523
23626
  className: `pelcro-container pelcro-profile-picture-container ${className}`
23524
- }, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
23627
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
23525
23628
  value: {
23526
23629
  state,
23527
23630
  dispatch
23528
23631
  }
23529
23632
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
23530
- store: store$2,
23633
+ store: store$3,
23531
23634
  key: i
23532
23635
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
23533
- store: store$2
23636
+ store: store$3
23534
23637
  })));
23535
23638
  };
23536
23639
  /**
@@ -23592,7 +23695,7 @@ const ProfilePicChangeButton = ({
23592
23695
  isSubmitting
23593
23696
  },
23594
23697
  dispatch
23595
- } = React.useContext(store$2);
23698
+ } = React.useContext(store$3);
23596
23699
  const {
23597
23700
  t
23598
23701
  } = useTranslation("userEdit");
@@ -24960,7 +25063,7 @@ const ProfilePicChangeCropper = ({
24960
25063
  zoom
24961
25064
  },
24962
25065
  dispatch
24963
- } = React.useContext(store$2);
25066
+ } = React.useContext(store$3);
24964
25067
  return /*#__PURE__*/React__default['default'].createElement("div", {
24965
25068
  className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
24966
25069
  }, /*#__PURE__*/React__default['default'].createElement(Cropper, Object.assign({
@@ -25002,7 +25105,7 @@ const ProfilePicChangeZoom = ({
25002
25105
  zoom
25003
25106
  },
25004
25107
  dispatch
25005
- } = React.useContext(store$2);
25108
+ } = React.useContext(store$3);
25006
25109
  const {
25007
25110
  t
25008
25111
  } = useTranslation("userEdit");
@@ -25025,18 +25128,18 @@ const ProfilePicChangeZoom = ({
25025
25128
  }, otherProps)));
25026
25129
  };
25027
25130
 
25028
- var _path$1;
25131
+ var _path$2;
25029
25132
 
25030
- 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); }
25133
+ 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); }
25031
25134
 
25032
25135
  function SvgPhotograph(props) {
25033
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
25136
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
25034
25137
  xmlns: "http://www.w3.org/2000/svg",
25035
25138
  className: "plc-h-6 plc-w-6",
25036
25139
  fill: "none",
25037
25140
  viewBox: "0 0 24 24",
25038
25141
  stroke: "currentColor"
25039
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
25142
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
25040
25143
  strokeLinecap: "round",
25041
25144
  strokeLinejoin: "round",
25042
25145
  strokeWidth: 2,
@@ -25054,7 +25157,7 @@ const ProfilePicChangeSelectButton = ({
25054
25157
  state: {
25055
25158
  isSubmitting
25056
25159
  }
25057
- } = React.useContext(store$2);
25160
+ } = React.useContext(store$3);
25058
25161
  const {
25059
25162
  t
25060
25163
  } = useTranslation("userEdit");
@@ -25096,7 +25199,7 @@ const ProfilePicChangeRemoveButton = ({
25096
25199
  state: {
25097
25200
  isSubmitting
25098
25201
  }
25099
- } = React.useContext(store$2);
25202
+ } = React.useContext(store$3);
25100
25203
  const {
25101
25204
  t
25102
25205
  } = useTranslation("userEdit");
@@ -25119,7 +25222,7 @@ const ProfilePicChangeWrapper = () => {
25119
25222
  state: {
25120
25223
  imageSrc
25121
25224
  }
25122
- } = React.useContext(store$2);
25225
+ } = React.useContext(store$3);
25123
25226
  const {
25124
25227
  t
25125
25228
  } = useTranslation("userEdit");
@@ -25181,17 +25284,17 @@ function ProfilePicChangeModal({
25181
25284
  }
25182
25285
  ProfilePicChangeModal.viewId = "profile-picture";
25183
25286
 
25184
- const initialState$1 = {
25287
+ const initialState$2 = {
25185
25288
  isSubmitting: false,
25186
25289
  alert: {
25187
25290
  type: "error",
25188
25291
  content: ""
25189
25292
  }
25190
25293
  };
25191
- const store$1 = /*#__PURE__*/React.createContext(initialState$1);
25294
+ const store$2 = /*#__PURE__*/React.createContext(initialState$2);
25192
25295
  const {
25193
- Provider: Provider$1
25194
- } = store$1;
25296
+ Provider: Provider$2
25297
+ } = store$2;
25195
25298
 
25196
25299
  const EmailVerifyContainer = ({
25197
25300
  style,
@@ -25254,21 +25357,21 @@ const EmailVerifyContainer = ({
25254
25357
  default:
25255
25358
  return state;
25256
25359
  }
25257
- }, initialState$1);
25360
+ }, initialState$2);
25258
25361
  return /*#__PURE__*/React__default['default'].createElement("div", {
25259
25362
  style: { ...style
25260
25363
  },
25261
25364
  className: `pelcro-container pelcro-email-verify-container ${className}`
25262
- }, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
25365
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
25263
25366
  value: {
25264
25367
  state,
25265
25368
  dispatch
25266
25369
  }
25267
25370
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
25268
- store: store$1,
25371
+ store: store$2,
25269
25372
  key: i
25270
25373
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
25271
- store: store$1
25374
+ store: store$2
25272
25375
  })));
25273
25376
  };
25274
25377
 
@@ -25282,7 +25385,7 @@ const EmailVerifyResendButton = ({
25282
25385
  state: {
25283
25386
  isSubmitting
25284
25387
  }
25285
- } = React.useContext(store$1);
25388
+ } = React.useContext(store$2);
25286
25389
  const {
25287
25390
  t
25288
25391
  } = useTranslation("verifyEmail");
@@ -25297,16 +25400,16 @@ const EmailVerifyResendButton = ({
25297
25400
  }, otherProps), name !== null && name !== void 0 ? name : t("labels.resend"));
25298
25401
  };
25299
25402
 
25300
- var _path, _path2;
25403
+ var _path$1, _path2;
25301
25404
 
25302
- 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); }
25405
+ 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); }
25303
25406
 
25304
25407
  function SvgEmailVerify(props) {
25305
- return /*#__PURE__*/React__namespace.createElement("svg", _extends({
25408
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
25306
25409
  className: "plc-w-6 plc-h-6",
25307
25410
  viewBox: "0 0 700 700",
25308
25411
  xmlns: "http://www.w3.org/2000/svg"
25309
- }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
25412
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
25310
25413
  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"
25311
25414
  })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
25312
25415
  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"
@@ -25410,11 +25513,11 @@ const invoicePaymentSubmitButton = props => {
25410
25513
  return /*#__PURE__*/React__default['default'].createElement(SubmitPaymentMethod, props);
25411
25514
  };
25412
25515
 
25413
- const initialState = {};
25414
- const store = /*#__PURE__*/React.createContext(initialState);
25516
+ const initialState$1 = {};
25517
+ const store$1 = /*#__PURE__*/React.createContext(initialState$1);
25415
25518
  const {
25416
- Provider
25417
- } = store;
25519
+ Provider: Provider$1
25520
+ } = store$1;
25418
25521
 
25419
25522
  const InvoiceDetailsContainer = ({
25420
25523
  style,
@@ -25435,21 +25538,21 @@ const InvoiceDetailsContainer = ({
25435
25538
  default:
25436
25539
  return state;
25437
25540
  }
25438
- }, initialState);
25541
+ }, initialState$1);
25439
25542
  return /*#__PURE__*/React__default['default'].createElement("div", {
25440
25543
  style: { ...style
25441
25544
  },
25442
25545
  className: `pelcro-container pelcro-invoice-details-container ${className}`
25443
- }, /*#__PURE__*/React__default['default'].createElement(Provider, {
25546
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
25444
25547
  value: {
25445
25548
  state,
25446
25549
  dispatch
25447
25550
  }
25448
25551
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
25449
- store,
25552
+ store: store$1,
25450
25553
  key: i
25451
25554
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
25452
- store
25555
+ store: store$1
25453
25556
  })));
25454
25557
  };
25455
25558
 
@@ -25481,7 +25584,7 @@ const InvoiceDetailsPayButton = ({
25481
25584
  }) => {
25482
25585
  const {
25483
25586
  dispatch
25484
- } = React.useContext(store);
25587
+ } = React.useContext(store$1);
25485
25588
  const {
25486
25589
  t
25487
25590
  } = useTranslation("invoiceDetails");
@@ -25586,6 +25689,232 @@ const InvoiceDetailsModal = ({
25586
25689
  };
25587
25690
  InvoiceDetailsModal.viewId = "invoice-details";
25588
25691
 
25692
+ const initialState = {
25693
+ selectedOption: ""
25694
+ };
25695
+ const store = /*#__PURE__*/React.createContext(initialState);
25696
+ const {
25697
+ Provider
25698
+ } = store;
25699
+
25700
+ const SubscriptionOptionsContainer = ({
25701
+ style,
25702
+ className = "",
25703
+ onRenewSubSuccess = () => {},
25704
+ onNewSubSuccess = () => {},
25705
+ children,
25706
+ ...props
25707
+ }) => {
25708
+ const submit = ({
25709
+ selectedOption
25710
+ }, dispatch) => {
25711
+ if (selectedOption === "renew") return onRenewSubSuccess();
25712
+ if (selectedOption === "new") return onNewSubSuccess();
25713
+ };
25714
+
25715
+ const [state, dispatch] = useReducerWithSideEffects((state, action) => {
25716
+ switch (action.type) {
25717
+ case SWITCH_TO_NEW:
25718
+ return lib_7({ ...state,
25719
+ selectedOption: "new"
25720
+ });
25721
+
25722
+ case SWITCH_TO_RENEW:
25723
+ return lib_7({ ...state,
25724
+ selectedOption: "renew"
25725
+ });
25726
+
25727
+ case HANDLE_SUBMIT:
25728
+ return lib_4((state, dispatch) => submit(state));
25729
+
25730
+ default:
25731
+ return state;
25732
+ }
25733
+ }, initialState);
25734
+ return /*#__PURE__*/React__default['default'].createElement("div", {
25735
+ style: { ...style
25736
+ },
25737
+ className: `pelcro-container pelcro-subscription-options-container ${className}`
25738
+ }, /*#__PURE__*/React__default['default'].createElement(Provider, {
25739
+ value: {
25740
+ state,
25741
+ dispatch
25742
+ }
25743
+ }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
25744
+ store,
25745
+ key: i
25746
+ })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
25747
+ store
25748
+ })));
25749
+ };
25750
+
25751
+ var _path;
25752
+
25753
+ 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); }
25754
+
25755
+ function SvgPlusCircle(props) {
25756
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends({
25757
+ xmlns: "http://www.w3.org/2000/svg",
25758
+ className: "plc-h-6 plc-w-6",
25759
+ fill: "none",
25760
+ viewBox: "0 0 24 24",
25761
+ stroke: "currentColor",
25762
+ strokeWidth: 2
25763
+ }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
25764
+ strokeLinecap: "round",
25765
+ strokeLinejoin: "round",
25766
+ d: "M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"
25767
+ })));
25768
+ }
25769
+
25770
+ const SubscriptionOptionsNewButton = ({
25771
+ name,
25772
+ onClick,
25773
+ ...otherProps
25774
+ }) => {
25775
+ const {
25776
+ dispatch,
25777
+ state: {
25778
+ selectedOption
25779
+ }
25780
+ } = React.useContext(store);
25781
+ const {
25782
+ t
25783
+ } = useTranslation("subscriptionOptions");
25784
+ const isChecked = selectedOption === "new";
25785
+ return /*#__PURE__*/React__default['default'].createElement(Radio, Object.assign({
25786
+ className: "plc-hidden pelcro-new-sub-option",
25787
+ 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"}`,
25788
+ id: "pelcro-new-sub-option",
25789
+ name: "option",
25790
+ onChange: () => {
25791
+ dispatch({
25792
+ type: SWITCH_TO_NEW
25793
+ });
25794
+ onClick === null || onClick === void 0 ? void 0 : onClick();
25795
+ },
25796
+ checked: isChecked
25797
+ }, otherProps), name !== null && name !== void 0 ? name : t("addNew"), /*#__PURE__*/React__default['default'].createElement(SvgPlusCircle, {
25798
+ className: "plc-w-full plc-h-full plc-mr-0"
25799
+ }));
25800
+ };
25801
+
25802
+ const SubscriptionOptionsRenewButton = ({
25803
+ name,
25804
+ onClick,
25805
+ ...otherProps
25806
+ }) => {
25807
+ const {
25808
+ dispatch,
25809
+ state: {
25810
+ selectedOption
25811
+ }
25812
+ } = React.useContext(store);
25813
+ const {
25814
+ t
25815
+ } = useTranslation("subscriptionOptions");
25816
+ const isChecked = selectedOption === "renew";
25817
+ return /*#__PURE__*/React__default['default'].createElement(Radio, Object.assign({
25818
+ className: "plc-hidden pelcro-renew-sub-option",
25819
+ 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"}`,
25820
+ id: "pelcro-renew-sub-option",
25821
+ name: "option",
25822
+ onChange: () => {
25823
+ dispatch({
25824
+ type: SWITCH_TO_RENEW
25825
+ });
25826
+ onClick === null || onClick === void 0 ? void 0 : onClick();
25827
+ },
25828
+ checked: isChecked
25829
+ }, otherProps), name !== null && name !== void 0 ? name : t("renew"), /*#__PURE__*/React__default['default'].createElement(SvgRefresh, {
25830
+ className: "plc-w-full plc-h-full plc-mr-0"
25831
+ }));
25832
+ };
25833
+
25834
+ const SubscriptionOptionsSubmit = ({
25835
+ name,
25836
+ onClick,
25837
+ ...otherProps
25838
+ }) => {
25839
+ const {
25840
+ dispatch,
25841
+ state: {
25842
+ selectedOption
25843
+ }
25844
+ } = React.useContext(store);
25845
+ const {
25846
+ t
25847
+ } = useTranslation("subscriptionOptions");
25848
+ return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
25849
+ onClick: () => {
25850
+ dispatch({
25851
+ type: HANDLE_SUBMIT
25852
+ });
25853
+ onClick === null || onClick === void 0 ? void 0 : onClick();
25854
+ },
25855
+ disabled: !selectedOption
25856
+ }, otherProps), name !== null && name !== void 0 ? name : t("next"));
25857
+ };
25858
+
25859
+ const SubscriptionOptionsView = props => {
25860
+ const {
25861
+ t
25862
+ } = useTranslation("subscriptionOptions");
25863
+ return /*#__PURE__*/React__default['default'].createElement("div", {
25864
+ id: "pelcro-subscription-options-view"
25865
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
25866
+ className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
25867
+ }, /*#__PURE__*/React__default['default'].createElement("h4", {
25868
+ className: "plc-text-2xl plc-font-semibold"
25869
+ }, t("title")), /*#__PURE__*/React__default['default'].createElement("p", null, t("subtitle"))), /*#__PURE__*/React__default['default'].createElement("form", {
25870
+ action: "javascript:void(0);",
25871
+ className: "plc-mt-2 pelcro-form"
25872
+ }, /*#__PURE__*/React__default['default'].createElement(SubscriptionOptionsContainer, props, /*#__PURE__*/React__default['default'].createElement("div", {
25873
+ className: "plc-flex plc-justify-between plc-items-center"
25874
+ }, /*#__PURE__*/React__default['default'].createElement(SubscriptionOptionsRenewButton, null), /*#__PURE__*/React__default['default'].createElement(SubscriptionOptionsNewButton, null)), /*#__PURE__*/React__default['default'].createElement(SubscriptionOptionsSubmit, {
25875
+ role: "submit",
25876
+ className: "plc-mt-4 plc-w-full",
25877
+ name: t("next"),
25878
+ id: "pelcro-submit"
25879
+ }))));
25880
+ };
25881
+
25882
+ const SubscriptionOptionsModal = ({
25883
+ onDisplay,
25884
+ onClose,
25885
+ ...otherProps
25886
+ }) => {
25887
+ const {
25888
+ switchView,
25889
+ setProductsList
25890
+ } = usePelcro();
25891
+
25892
+ const onRenewSubSuccess = () => {
25893
+ var _otherProps$onRenewSu;
25894
+
25895
+ (_otherProps$onRenewSu = otherProps.onRenewSubSuccess) === null || _otherProps$onRenewSu === void 0 ? void 0 : _otherProps$onRenewSu.call(otherProps);
25896
+ setProductsList(getRenewableProducts());
25897
+ switchView("_plan-select-renew");
25898
+ };
25899
+
25900
+ const onNewSubSuccess = () => {
25901
+ var _otherProps$onNewSubS;
25902
+
25903
+ (_otherProps$onNewSubS = otherProps.onNewSubSuccess) === null || _otherProps$onNewSubS === void 0 ? void 0 : _otherProps$onNewSubS.call(otherProps);
25904
+ switchView("plan-select");
25905
+ };
25906
+
25907
+ return /*#__PURE__*/React__default['default'].createElement(Modal, {
25908
+ onDisplay: onDisplay,
25909
+ onClose: onClose,
25910
+ id: "pelcro-subscription-options-modal"
25911
+ }, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(SubscriptionOptionsView, Object.assign({}, otherProps, {
25912
+ onNewSubSuccess: onNewSubSuccess,
25913
+ onRenewSubSuccess: onRenewSubSuccess
25914
+ }))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
25915
+ };
25916
+ SubscriptionOptionsModal.viewId = "subscription-options";
25917
+
25589
25918
  exports.AddressCreateCity = AddressCreateCity;
25590
25919
  exports.AddressCreateContainer = AddressCreateContainer;
25591
25920
  exports.AddressCreateCountrySelect = AddressCreateCountrySelect;
@@ -25763,6 +26092,12 @@ exports.SubmitPaymentMethod = SubmitPaymentMethod;
25763
26092
  exports.SubscriptionCreateContainer = SubscriptionCreateContainer;
25764
26093
  exports.SubscriptionCreateModal = SubscriptionCreateModal;
25765
26094
  exports.SubscriptionCreateView = SubscriptionCreateView;
26095
+ exports.SubscriptionOptionsContainer = SubscriptionOptionsContainer;
26096
+ exports.SubscriptionOptionsModal = SubscriptionOptionsModal;
26097
+ exports.SubscriptionOptionsNewButton = SubscriptionOptionsNewButton;
26098
+ exports.SubscriptionOptionsRenewButton = SubscriptionOptionsRenewButton;
26099
+ exports.SubscriptionOptionsSubmit = SubscriptionOptionsSubmit;
26100
+ exports.SubscriptionOptionsView = SubscriptionOptionsView;
25766
26101
  exports.SubscriptionRenewContainer = SubscriptionRenewContainer;
25767
26102
  exports.SubscriptionRenewModal = SubscriptionRenewModal;
25768
26103
  exports.SubscriptionRenewView = SubscriptionRenewView;