@pelcro/react-pelcro-js 3.25.0 → 3.26.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -3253,7 +3253,7 @@ var validation$3 = {
3253
3253
  enterLastName: "Last name is required.",
3254
3254
  enterPhone: "Phone number is required."
3255
3255
  };
3256
- var buttons$j = {
3256
+ var buttons$n = {
3257
3257
  account: "My account",
3258
3258
  login: "Login",
3259
3259
  subscribe: "Subscribe"
@@ -3331,7 +3331,7 @@ var confirm$b = {
3331
3331
  };
3332
3332
  var common_en = {
3333
3333
  validation: validation$3,
3334
- buttons: buttons$j,
3334
+ buttons: buttons$n,
3335
3335
  dashboard: dashboard$4,
3336
3336
  select: select$7,
3337
3337
  confirm: confirm$b
@@ -3362,7 +3362,7 @@ var paymentMethod_en = {
3362
3362
  var title$z = "Enter your email to subscribe to our newsletter";
3363
3363
  var updateTitle$3 = "Update newsletter selections";
3364
3364
  var subtitle$f = "We may use your email for other marketing communication";
3365
- var labels$12 = {
3365
+ var labels$17 = {
3366
3366
  submit: "Submit",
3367
3367
  firstName: "First name",
3368
3368
  lastName: "Last name",
@@ -3370,7 +3370,7 @@ var labels$12 = {
3370
3370
  postalCode: "Postal code",
3371
3371
  required: "required"
3372
3372
  };
3373
- var messages$17 = {
3373
+ var messages$1b = {
3374
3374
  alreadyHaveAccount: "Already have an account?",
3375
3375
  success: "Newsletters were successfully updated",
3376
3376
  loginHere: "Login here.",
@@ -3381,14 +3381,14 @@ var newsletter_en = {
3381
3381
  title: title$z,
3382
3382
  updateTitle: updateTitle$3,
3383
3383
  subtitle: subtitle$f,
3384
- labels: labels$12,
3385
- messages: messages$17
3384
+ labels: labels$17,
3385
+ messages: messages$1b
3386
3386
  };
3387
3387
 
3388
- var labels$11 = {
3388
+ var labels$16 = {
3389
3389
  "continue": "Continue to content"
3390
3390
  };
3391
- var messages$16 = {
3391
+ var messages$1a = {
3392
3392
  yourFreeTrial: "Subscription successful!",
3393
3393
  youHaveAccess: "Hope you enjoy the subscription. Please contact us if you have any questions or concerns.",
3394
3394
  clickToLearn: {
@@ -3414,12 +3414,12 @@ var errors$j = {
3414
3414
  "": ""
3415
3415
  };
3416
3416
  var success_en = {
3417
- labels: labels$11,
3418
- messages: messages$16,
3417
+ labels: labels$16,
3418
+ messages: messages$1a,
3419
3419
  errors: errors$j
3420
3420
  };
3421
3421
 
3422
- var messages$15 = {
3422
+ var messages$19 = {
3423
3423
  freeVisits: "Free visits left:",
3424
3424
  subscribeNow: "Subscribe",
3425
3425
  alreadyHaveAccount: "Already have an account?",
@@ -3429,16 +3429,16 @@ var errors$i = {
3429
3429
  "": ""
3430
3430
  };
3431
3431
  var meter_en = {
3432
- messages: messages$15,
3432
+ messages: messages$19,
3433
3433
  errors: errors$i
3434
3434
  };
3435
3435
 
3436
- var messages$14 = {
3436
+ var messages$18 = {
3437
3437
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
3438
3438
  bankRedirection: "Please hold, redirecting you to your bank.",
3439
3439
  bankAuthenticationSuccess: "Please wait while we process your request."
3440
3440
  };
3441
- var labels$10 = {
3441
+ var labels$15 = {
3442
3442
  card: "Enter card number",
3443
3443
  date: "Expiration date",
3444
3444
  CVC: "CVC",
@@ -3458,11 +3458,13 @@ var labels$10 = {
3458
3458
  firstName: "First name",
3459
3459
  lastName: "Last name",
3460
3460
  phone: "Phone",
3461
- freeItems: "Free Items"
3461
+ freeItems: "Free Items",
3462
+ email: "Email",
3463
+ password: "Password"
3462
3464
  };
3463
3465
  var checkoutForm_en = {
3464
- messages: messages$14,
3465
- labels: labels$10
3466
+ messages: messages$18,
3467
+ labels: labels$15
3466
3468
  };
3467
3469
 
3468
3470
  var youAreSafe$3 = "You're safe - PCI compliant 128 SSL by";
@@ -3486,7 +3488,7 @@ var messages_en = {
3486
3488
  zeroTotalInvoice: zeroTotalInvoice$3
3487
3489
  };
3488
3490
 
3489
- var labels$$ = {
3491
+ var labels$14 = {
3490
3492
  email: "Enter email",
3491
3493
  username: "Enter username",
3492
3494
  password: "Enter password",
@@ -3495,7 +3497,7 @@ var labels$$ = {
3495
3497
  passwordPlaceholder: "Password",
3496
3498
  login: "Login"
3497
3499
  };
3498
- var messages$13 = {
3500
+ var messages$17 = {
3499
3501
  loginTo: "Login to your account",
3500
3502
  welcome: "Welcome back, sign in with your existing account.",
3501
3503
  dontHaveAccount: "Don't have an account yet?",
@@ -3514,28 +3516,28 @@ var errors$h = {
3514
3516
  "": ""
3515
3517
  };
3516
3518
  var login_en = {
3517
- labels: labels$$,
3518
- messages: messages$13,
3519
+ labels: labels$14,
3520
+ messages: messages$17,
3519
3521
  errors: errors$h
3520
3522
  };
3521
3523
 
3522
- var labels$_ = {
3524
+ var labels$13 = {
3523
3525
  title: "Verifying Passwordless Link",
3524
3526
  instructions: "You're on your way!\nLet's confirm your email address.\nClick on the verification link we've sent to your email:",
3525
3527
  resend: "Resend email"
3526
3528
  };
3527
- var messages$12 = {
3529
+ var messages$16 = {
3528
3530
  resent: "Resent successfully",
3529
3531
  success: "You have logged in successfully"
3530
3532
  };
3531
3533
  var verifyLinkToken_en = {
3532
- labels: labels$_,
3533
- messages: messages$12
3534
+ labels: labels$13,
3535
+ messages: messages$16
3534
3536
  };
3535
3537
 
3536
3538
  var title$y = "Create an account";
3537
3539
  var subtitle$e = "Enter your email and password below";
3538
- var labels$Z = {
3540
+ var labels$12 = {
3539
3541
  signUpFacebook: "Sign up with Facebook",
3540
3542
  signUpGoogle: "Sign up with Google",
3541
3543
  signUpEmail: "Sign up with Email",
@@ -3548,7 +3550,7 @@ var labels$Z = {
3548
3550
  lastName: "Last name",
3549
3551
  phone: "Phone"
3550
3552
  };
3551
- var messages$11 = {
3553
+ var messages$15 = {
3552
3554
  alreadyHaveAccount: "Already have an account?",
3553
3555
  createAccount: "Create account",
3554
3556
  loginHere: "login here. ",
@@ -3622,14 +3624,14 @@ var redeem$3 = {
3622
3624
  var register_en = {
3623
3625
  title: title$y,
3624
3626
  subtitle: subtitle$e,
3625
- labels: labels$Z,
3626
- messages: messages$11,
3627
+ labels: labels$12,
3628
+ messages: messages$15,
3627
3629
  errors: errors$g,
3628
3630
  gift: gift$3,
3629
3631
  redeem: redeem$3
3630
3632
  };
3631
3633
 
3632
- var labels$Y = {
3634
+ var labels$11 = {
3633
3635
  title: "Want to update your profile?",
3634
3636
  subtitle: "Enter your information below to update your profile",
3635
3637
  email: "Email",
@@ -3648,21 +3650,21 @@ var labels$Y = {
3648
3650
  zoom: "Zoom",
3649
3651
  tin: "Tax Identification Number"
3650
3652
  };
3651
- var messages$10 = {
3653
+ var messages$14 = {
3652
3654
  userUpdated: "Thanks! Your profile was updated successfully.",
3653
3655
  pictureRemoved: "Your profile picture was removed successfully.",
3654
3656
  pictureUpdated: "Your profile picture was updated successfully."
3655
3657
  };
3656
3658
  var userEdit_en = {
3657
- labels: labels$Y,
3658
- messages: messages$10
3659
+ labels: labels$11,
3660
+ messages: messages$14
3659
3661
  };
3660
3662
 
3661
3663
  var title$x = "Enter your shipping address";
3662
3664
  var titleGifting$3 = "Enter your address";
3663
3665
  var selectAddressTitle$3 = "Please select an address";
3664
3666
  var selectAddressSubtitle$3 = "Select one of your saved addresses, or add a new one";
3665
- var labels$X = {
3667
+ var labels$10 = {
3666
3668
  address: "Address",
3667
3669
  code: "Postal Code/Zip",
3668
3670
  city: "City",
@@ -3673,12 +3675,12 @@ var labels$X = {
3673
3675
  required: "required",
3674
3676
  isDefault: "Set as default"
3675
3677
  };
3676
- var buttons$i = {
3678
+ var buttons$m = {
3677
3679
  submit: "Submit",
3678
3680
  selectAddress: "Select address",
3679
3681
  addAddress: "Add new address"
3680
3682
  };
3681
- var messages$$ = {
3683
+ var messages$13 = {
3682
3684
  addressUpdated: "The address was successfully updated!",
3683
3685
  subRedeemed: "Your subscription has been redeemed."
3684
3686
  };
@@ -3687,9 +3689,9 @@ var address_en = {
3687
3689
  titleGifting: titleGifting$3,
3688
3690
  selectAddressTitle: selectAddressTitle$3,
3689
3691
  selectAddressSubtitle: selectAddressSubtitle$3,
3690
- labels: labels$X,
3691
- buttons: buttons$i,
3692
- messages: messages$$
3692
+ labels: labels$10,
3693
+ buttons: buttons$m,
3694
+ messages: messages$13
3693
3695
  };
3694
3696
 
3695
3697
  var title$w = "Reset your password";
@@ -3717,7 +3719,7 @@ var password$6 = "Password";
3717
3719
  var submit$e = "Submit";
3718
3720
  var required$e = "Required";
3719
3721
  var passwordResetEmailSent$3 = "Password reset instructions have been sent to your email";
3720
- var messages$_ = {
3722
+ var messages$12 = {
3721
3723
  alreadyHaveAccount: "Already have an account?",
3722
3724
  loginHere: "login here."
3723
3725
  };
@@ -3728,7 +3730,7 @@ var passwordForgot_en = {
3728
3730
  submit: submit$e,
3729
3731
  required: required$e,
3730
3732
  passwordResetEmailSent: passwordResetEmailSent$3,
3731
- messages: messages$_
3733
+ messages: messages$12
3732
3734
  };
3733
3735
 
3734
3736
  var title$u = "Change your password";
@@ -3756,7 +3758,7 @@ var title$t = "Passwordless Login";
3756
3758
  var email$9 = "Enter email";
3757
3759
  var submit$c = "Submit";
3758
3760
  var required$c = "Required";
3759
- var messages$Z = {
3761
+ var messages$11 = {
3760
3762
  PasswordlessLoginSuccess: "Please check your email and follow the instructions there"
3761
3763
  };
3762
3764
  var passwordlessRequest_en = {
@@ -3764,7 +3766,7 @@ var passwordlessRequest_en = {
3764
3766
  email: email$9,
3765
3767
  submit: submit$c,
3766
3768
  required: required$c,
3767
- messages: messages$Z
3769
+ messages: messages$11
3768
3770
  };
3769
3771
 
3770
3772
  var title$s = "Your shopping cart";
@@ -3792,13 +3794,13 @@ var cart_en = {
3792
3794
  removeAll: removeAll$3
3793
3795
  };
3794
3796
 
3795
- var buttons$h = {
3797
+ var buttons$l = {
3796
3798
  select: "Select",
3797
3799
  added: "Added to cart",
3798
3800
  purchase: "Purchase",
3799
3801
  "continue": "Continue"
3800
3802
  };
3801
- var messages$Y = {
3803
+ var messages$10 = {
3802
3804
  orderConfirmed: {
3803
3805
  title: "Order confirmed!",
3804
3806
  body: "Your order has been confirmed and will be shipped within the next few days. You'll shortly receive an email confirmation of this order."
@@ -3807,17 +3809,17 @@ var messages$Y = {
3807
3809
  multipleCurrencies: "Your cart currently contains items which are available in different currencies. In order to proceed with the checkout, please make sure that all items have the same currency.",
3808
3810
  currencyMismatch: "The selected item(s) do not match your current default currency ({{currency}}). Please choose item(s) only matching this currency."
3809
3811
  };
3810
- var labels$W = {
3812
+ var labels$$ = {
3811
3813
  summary: "Order summary",
3812
3814
  total: "total"
3813
3815
  };
3814
3816
  var shop_en = {
3815
- buttons: buttons$h,
3816
- messages: messages$Y,
3817
- labels: labels$W
3817
+ buttons: buttons$l,
3818
+ messages: messages$10,
3819
+ labels: labels$$
3818
3820
  };
3819
3821
 
3820
- var labels$V = {
3822
+ var labels$_ = {
3821
3823
  cardNumber: "Card number",
3822
3824
  securityCode: "Security Code",
3823
3825
  submit: "Submit",
@@ -3839,7 +3841,7 @@ var labels$V = {
3839
3841
  title: "Payment Information"
3840
3842
  }
3841
3843
  };
3842
- var messages$X = {
3844
+ var messages$$ = {
3843
3845
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
3844
3846
  cancel: "Cancel your subscription online at anytime.",
3845
3847
  giftSent: "Subscription gift has been sent to",
@@ -3853,12 +3855,12 @@ var errors$f = {
3853
3855
  "": ""
3854
3856
  };
3855
3857
  var payment_en = {
3856
- labels: labels$V,
3857
- messages: messages$X,
3858
+ labels: labels$_,
3859
+ messages: messages$$,
3858
3860
  errors: errors$f
3859
3861
  };
3860
3862
 
3861
- var labels$U = {
3863
+ var labels$Z = {
3862
3864
  menu: "Pelcro Menu",
3863
3865
  name: "Name",
3864
3866
  email: "Email",
@@ -3944,9 +3946,12 @@ var labels$U = {
3944
3946
  },
3945
3947
  subCancellation: {
3946
3948
  goBack: "Go back"
3949
+ },
3950
+ donationCancellation: {
3951
+ goBack: "Go back"
3947
3952
  }
3948
3953
  };
3949
- var messages$W = {
3954
+ var messages$_ = {
3950
3955
  noCard: "You don't have a card",
3951
3956
  subCancellation: {
3952
3957
  isSureToCancel: "Are you sure you want to cancel your subscription?",
@@ -3963,19 +3968,35 @@ var messages$W = {
3963
3968
  loading: "Unsuspending your subscription",
3964
3969
  success: "Subscription is successfully unsuspended",
3965
3970
  error: "Error while unsuspending your subscription"
3971
+ },
3972
+ donationCancellation: {
3973
+ isSureToCancel: "Are you sure you want to cancel your donation?",
3974
+ loading: "Cancelling your donation",
3975
+ success: "Donation is successfully cancelled",
3976
+ error: "Error while cancelling your donation"
3977
+ },
3978
+ donationReactivation: {
3979
+ success: "Donation is successfully reactivated",
3980
+ error: "Error while reactivating your donation"
3981
+ },
3982
+ donationUnSuspend: {
3983
+ isSureToUnSuspend: "Are you sure you want to unsuspend your donation?",
3984
+ loading: "Unsuspending your donation",
3985
+ success: "Donation is successfully unsuspended",
3986
+ error: "Error while unsuspending your donation"
3966
3987
  }
3967
3988
  };
3968
3989
  var dashboard_en = {
3969
- labels: labels$U,
3970
- messages: messages$W
3990
+ labels: labels$Z,
3991
+ messages: messages$_
3971
3992
  };
3972
3993
 
3973
- var messages$V = {
3994
+ var messages$Z = {
3974
3995
  alreadyHaveAccount: "Already have an account?",
3975
3996
  loginHere: "Login here",
3976
3997
  checkbox: "Check this box to gift this subscription"
3977
3998
  };
3978
- var labels$T = {
3999
+ var labels$Y = {
3979
4000
  plan: {
3980
4001
  title: "Subscribe to a plan",
3981
4002
  subtitle: "Select one of the plans below and click on next."
@@ -3992,15 +4013,49 @@ var labels$T = {
3992
4013
  or: "Or take a look at some of our other options below"
3993
4014
  }
3994
4015
  };
3995
- var buttons$g = {
4016
+ var buttons$k = {
3996
4017
  next: "Next",
3997
4018
  select: "Select",
3998
4019
  back: "Back"
3999
4020
  };
4000
4021
  var select_en = {
4001
- messages: messages$V,
4002
- labels: labels$T,
4003
- buttons: buttons$g
4022
+ messages: messages$Z,
4023
+ labels: labels$Y,
4024
+ buttons: buttons$k
4025
+ };
4026
+
4027
+ var messages$Y = {
4028
+ alreadyHaveAccount: "Already have an account?",
4029
+ loginHere: "Login here",
4030
+ checkbox: "Check this box to gift this subscription"
4031
+ };
4032
+ var labels$X = {
4033
+ plan: {
4034
+ title: "Subscribe to a plan",
4035
+ subtitle: "Select one of the plans below and click on next."
4036
+ },
4037
+ product: {
4038
+ title: "Subscribe to a product",
4039
+ subtitle: "Select one of the products below and click on next."
4040
+ },
4041
+ selectProduct: "Select a product",
4042
+ selectPlan: "Select a plan",
4043
+ startingAt: "Starting at",
4044
+ restrictiveArticles: {
4045
+ subscribeTo: "Subscribe to one of the following options to get access to this page",
4046
+ or: "Or take a look at some of our other options below"
4047
+ }
4048
+ };
4049
+ var buttons$j = {
4050
+ signupAndDonate: "Sign up & donate",
4051
+ donate: "Donate",
4052
+ select: "Select",
4053
+ back: "Back"
4054
+ };
4055
+ var donation_en = {
4056
+ messages: messages$Y,
4057
+ labels: labels$X,
4058
+ buttons: buttons$j
4004
4059
  };
4005
4060
 
4006
4061
  var confirm$9 = {
@@ -4013,46 +4068,46 @@ var notification_en = {
4013
4068
  confirm: confirm$9
4014
4069
  };
4015
4070
 
4016
- var labels$S = {
4071
+ var labels$W = {
4017
4072
  title: "Verify your email",
4018
4073
  instructions: "You're on your way!\nLet's confirm your email address.\nClick on the verification link we've sent to your email:",
4019
4074
  resend: "Resend email"
4020
4075
  };
4021
- var messages$U = {
4076
+ var messages$X = {
4022
4077
  resent: "Resent successfully",
4023
4078
  success: "Email verified successfully!"
4024
4079
  };
4025
4080
  var verifyEmail_en = {
4026
- labels: labels$S,
4027
- messages: messages$U
4081
+ labels: labels$W,
4082
+ messages: messages$X
4028
4083
  };
4029
4084
 
4030
4085
  var title$r = "Invoice details";
4031
- var labels$R = {
4086
+ var labels$V = {
4032
4087
  summary: "Summary",
4033
4088
  total: "Total",
4034
4089
  amountPaid: "Amount paid",
4035
4090
  amountDue: "Amount due",
4036
4091
  creationDate: "Created on:"
4037
4092
  };
4038
- var buttons$f = {
4093
+ var buttons$i = {
4039
4094
  download: "Download",
4040
4095
  pay: "Pay now"
4041
4096
  };
4042
4097
  var invoiceDetails_en = {
4043
4098
  title: title$r,
4044
- labels: labels$R,
4045
- buttons: buttons$f
4099
+ labels: labels$V,
4100
+ buttons: buttons$i
4046
4101
  };
4047
4102
 
4048
- var labels$Q = {
4103
+ var labels$U = {
4049
4104
  title: "Cancel subscription",
4050
4105
  cancelReason: "Cancellation reason",
4051
4106
  subCancellation: {
4052
4107
  goBack: "Go back"
4053
4108
  }
4054
4109
  };
4055
- var messages$T = {
4110
+ var messages$W = {
4056
4111
  subscriptionEnd: "This subscription is set to expire on",
4057
4112
  cancelNow: "Cancel Subscription Now",
4058
4113
  cancelLater: "Cancel at Period End",
@@ -4065,59 +4120,11 @@ var messages$T = {
4065
4120
  }
4066
4121
  };
4067
4122
  var subscriptionCancel_en = {
4068
- labels: labels$Q,
4069
- messages: messages$T
4070
- };
4071
-
4072
- var labels$P = {
4073
- title: "Annuler l'abonnement",
4074
- cancelReason: "Motif d'annulation",
4075
- subCancellation: {
4076
- goBack: "Retourner"
4077
- }
4078
- };
4079
- var messages$S = {
4080
- subscriptionEnd: "Cet abonnement doit expirer le",
4081
- cancelNow: "Cancel Subscription Now",
4082
- cancelLater: "Annuler l'abonnement maintenant",
4083
- subCancellation: {
4084
- isSureToCancelNow: "Êtes-vous sûr de vouloir résilier votre abonnement immédiatement?",
4085
- isSureToCancel: "Êtes-vous sûr de vouloir résilier votre abonnement?",
4086
- loading: "Annulation de votre abonnement",
4087
- success: "L'abonnement a été annulé avec succès",
4088
- error: "Erreur lors de l'annulation de votre abonnement"
4089
- }
4090
- };
4091
- var subscriptionCancel_fr = {
4092
- labels: labels$P,
4093
- messages: messages$S
4094
- };
4095
-
4096
- var labels$O = {
4097
- title: "구독 취소",
4098
- cancelReason: "취소 사유",
4099
- subCancellation: {
4100
- goBack: "돌아가기"
4101
- }
4102
- };
4103
- var messages$R = {
4104
- subscriptionEnd: "이 구독은 다음 날짜에 만료되도록 설정되었습니다.",
4105
- cancelNow: "지금 구독 취소",
4106
- cancelLater: "기간 종료 시 취소",
4107
- subCancellation: {
4108
- isSureToCancelNow: "구독을 즉시 취소하시겠습니까?",
4109
- isSureToCancel: "구독을 취소하시겠습니까?",
4110
- loading: "구독 취소",
4111
- success: "구독이 성공적으로 취소되었습니다.",
4112
- error: "구독 취소 중 오류 발생"
4113
- }
4114
- };
4115
- var subscriptionCancel_ko = {
4116
- labels: labels$O,
4117
- messages: messages$R
4123
+ labels: labels$U,
4124
+ messages: messages$W
4118
4125
  };
4119
4126
 
4120
- var labels$N = {
4127
+ var labels$T = {
4121
4128
  inviteMembers: "Invite Members",
4122
4129
  listOfMembers: "List of members",
4123
4130
  invite: "Invite",
@@ -4125,48 +4132,21 @@ var labels$N = {
4125
4132
  emails: "Enter emails",
4126
4133
  status: "Status",
4127
4134
  actions: "Actions",
4128
- email: "Email"
4135
+ email: "Email",
4136
+ listNote: "Comma-separated list e.g."
4129
4137
  };
4130
4138
  var subscriptionManageMembers_en = {
4131
- labels: labels$N
4132
- };
4133
-
4134
- var labels$M = {
4135
- inviteMembers: "Inviter des membres",
4136
- listOfMembers: "Liste des membres",
4137
- invite: "Inviter",
4138
- remove: "Retirer",
4139
- emails: "Saisir les e-mails",
4140
- status: "Statut",
4141
- actions: "Actions",
4142
- email: "E-mail"
4143
- };
4144
- var subscriptionManageMembers_fr = {
4145
- labels: labels$M
4146
- };
4147
-
4148
- var labels$L = {
4149
- inviteMembers: "회원 초대",
4150
- listOfMembers: "구성원 목록",
4151
- invite: "초대",
4152
- remove: "제거하다",
4153
- emails: "이메일 입력",
4154
- status: "상태",
4155
- actions: "행위",
4156
- email: "이메일"
4157
- };
4158
- var subscriptionManageMembers_ko = {
4159
- labels: labels$L
4139
+ labels: labels$T
4160
4140
  };
4161
4141
 
4162
- var labels$K = {
4142
+ var labels$S = {
4163
4143
  title: "Suspend subscription",
4164
4144
  suspensionDate: "Suspension date",
4165
4145
  subCancellation: {
4166
4146
  goBack: "Go back"
4167
4147
  }
4168
4148
  };
4169
- var messages$Q = {
4149
+ var messages$V = {
4170
4150
  suspensionEnd: "The suspension is set to expire on",
4171
4151
  suspendNow: "Suspend Subscription Now",
4172
4152
  suspendLater: "Suspend at Period End",
@@ -4179,8 +4159,8 @@ var messages$Q = {
4179
4159
  }
4180
4160
  };
4181
4161
  var subscriptionSuspend_en = {
4182
- labels: labels$K,
4183
- messages: messages$Q
4162
+ labels: labels$S,
4163
+ messages: messages$V
4184
4164
  };
4185
4165
 
4186
4166
  var validation$2 = {
@@ -4195,7 +4175,7 @@ var validation$2 = {
4195
4175
  enterLastName: "Le nom de famille est requis.",
4196
4176
  enterPhone: "Le numéro de téléphone est requis."
4197
4177
  };
4198
- var buttons$e = {
4178
+ var buttons$h = {
4199
4179
  account: "Accès abonné(e)s",
4200
4180
  login: "Se connecter",
4201
4181
  subscribe: "S'abonner"
@@ -4273,7 +4253,7 @@ var confirm$8 = {
4273
4253
  };
4274
4254
  var common_fr = {
4275
4255
  validation: validation$2,
4276
- buttons: buttons$e,
4256
+ buttons: buttons$h,
4277
4257
  dashboard: dashboard$3,
4278
4258
  select: select$5,
4279
4259
  confirm: confirm$8
@@ -4304,7 +4284,7 @@ var paymentMethod_fr = {
4304
4284
  var title$q = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
4305
4285
  var updateTitle$2 = "Mettre à jour son choix d'infolettres";
4306
4286
  var subtitle$b = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
4307
- var labels$J = {
4287
+ var labels$R = {
4308
4288
  submit: "Lire l’article !",
4309
4289
  firstName: "Prénom",
4310
4290
  lastName: "Nom de famille",
@@ -4312,7 +4292,7 @@ var labels$J = {
4312
4292
  postalCode: "Code postal",
4313
4293
  required: "Champs obligatoires"
4314
4294
  };
4315
- var messages$P = {
4295
+ var messages$U = {
4316
4296
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4317
4297
  success: "Votre choix d'infolettres à été mis à jour",
4318
4298
  loginHere: "Connectez-vous ici",
@@ -4323,14 +4303,14 @@ var newsletter_fr = {
4323
4303
  title: title$q,
4324
4304
  updateTitle: updateTitle$2,
4325
4305
  subtitle: subtitle$b,
4326
- labels: labels$J,
4327
- messages: messages$P
4306
+ labels: labels$R,
4307
+ messages: messages$U
4328
4308
  };
4329
4309
 
4330
- var labels$I = {
4310
+ var labels$Q = {
4331
4311
  "continue": "Abonnement réussi !"
4332
4312
  };
4333
- var messages$O = {
4313
+ var messages$T = {
4334
4314
  yourFreeTrial: "Votre essai gratuit vient de débuter",
4335
4315
  youHaveAccess: "Nous espérons que vous allez apprécier votre abonnement. Veuillez nous contacter si vous avez des questions ou des préoccupations.",
4336
4316
  clickToLearn: {
@@ -4356,12 +4336,12 @@ var errors$e = {
4356
4336
  "": ""
4357
4337
  };
4358
4338
  var success_fr = {
4359
- labels: labels$I,
4360
- messages: messages$O,
4339
+ labels: labels$Q,
4340
+ messages: messages$T,
4361
4341
  errors: errors$e
4362
4342
  };
4363
4343
 
4364
- var messages$N = {
4344
+ var messages$S = {
4365
4345
  freeVisits: "Visites gratuites restantes:",
4366
4346
  subscribeNow: "Abonnez-vous maintenant !",
4367
4347
  alreadyHaveAccount: "Vous avez déjà un compte ?",
@@ -4371,16 +4351,16 @@ var errors$d = {
4371
4351
  "": ""
4372
4352
  };
4373
4353
  var meter_fr = {
4374
- messages: messages$N,
4354
+ messages: messages$S,
4375
4355
  errors: errors$d
4376
4356
  };
4377
4357
 
4378
- var messages$M = {
4358
+ var messages$R = {
4379
4359
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
4380
4360
  bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque.",
4381
4361
  bankAuthenticationSuccess: "Veuillez patienter pendant que nous accédons à votre requête."
4382
4362
  };
4383
- var labels$H = {
4363
+ var labels$P = {
4384
4364
  card: "Entrez le numéro de carte",
4385
4365
  date: "Date d’expiration",
4386
4366
  CVC: "CVC",
@@ -4400,11 +4380,13 @@ var labels$H = {
4400
4380
  firstName: "Prénom",
4401
4381
  lastName: "Nom de famille",
4402
4382
  phone: "Téléphoner",
4403
- freeItems: "Articles gratuits"
4383
+ freeItems: "Articles gratuits",
4384
+ email: "Courriel",
4385
+ password: "Créer un mot de passe"
4404
4386
  };
4405
4387
  var checkoutForm_fr = {
4406
- messages: messages$M,
4407
- labels: labels$H
4388
+ messages: messages$R,
4389
+ labels: labels$P
4408
4390
  };
4409
4391
 
4410
4392
  var youAreSafe$2 = "Vous êtes en sécurité - PCI conforme 128 SSL par";
@@ -4428,7 +4410,7 @@ var messages_fr = {
4428
4410
  zeroTotalInvoice: zeroTotalInvoice$2
4429
4411
  };
4430
4412
 
4431
- var labels$G = {
4413
+ var labels$O = {
4432
4414
  email: "Entrez votre adresse courriel",
4433
4415
  username: "Saisissez votre nom d'utilisateur",
4434
4416
  password: "Entrez votre mot de passe",
@@ -4437,7 +4419,7 @@ var labels$G = {
4437
4419
  passwordPlaceholder: "Mot de passe",
4438
4420
  login: "Connexion"
4439
4421
  };
4440
- var messages$L = {
4422
+ var messages$Q = {
4441
4423
  loginTo: "Connectez-vous à votre compte",
4442
4424
  welcome: "Bienvenue, connectez-vous avec votre compte existant.",
4443
4425
  dontHaveAccount: "Vous n’avez pas encore de compte ?",
@@ -4456,28 +4438,28 @@ var errors$c = {
4456
4438
  "": ""
4457
4439
  };
4458
4440
  var login_fr = {
4459
- labels: labels$G,
4460
- messages: messages$L,
4441
+ labels: labels$O,
4442
+ messages: messages$Q,
4461
4443
  errors: errors$c
4462
4444
  };
4463
4445
 
4464
- var labels$F = {
4446
+ var labels$N = {
4465
4447
  title: "Confirmez votre courriel",
4466
4448
  instructions: "Confirmez votre courriel.\nVeuillez cliquer sur le lien de vérification, qui vous a été envoyé à:",
4467
4449
  resend: "Renvoyer le courriel"
4468
4450
  };
4469
- var messages$K = {
4451
+ var messages$P = {
4470
4452
  resent: "Renvoyé avec succès",
4471
4453
  success: "Vous vous êtes connecté avec succès"
4472
4454
  };
4473
4455
  var verifyLinkToken_fr = {
4474
- labels: labels$F,
4475
- messages: messages$K
4456
+ labels: labels$N,
4457
+ messages: messages$P
4476
4458
  };
4477
4459
 
4478
4460
  var title$p = "Créer un compte";
4479
4461
  var subtitle$a = "Entrez votre courriel et votre mot de passe ci-dessous";
4480
- var labels$E = {
4462
+ var labels$M = {
4481
4463
  signUpFacebook: "Inscrivez-vous avec Facebook",
4482
4464
  signUpGoogle: "Inscrivez-vous avec Google",
4483
4465
  signUpEmail: "Inscrivez-vous avec votre courriel",
@@ -4490,7 +4472,7 @@ var labels$E = {
4490
4472
  lastName: "Nom de famille",
4491
4473
  phone: "Téléphoner"
4492
4474
  };
4493
- var messages$J = {
4475
+ var messages$O = {
4494
4476
  alreadyHaveAccount: "Vous avez déjà un compte?",
4495
4477
  createAccount: "Créer un compte",
4496
4478
  loginHere: "Connectez-vous ici",
@@ -4565,14 +4547,14 @@ var redeem$2 = {
4565
4547
  var register_fr = {
4566
4548
  title: title$p,
4567
4549
  subtitle: subtitle$a,
4568
- labels: labels$E,
4569
- messages: messages$J,
4550
+ labels: labels$M,
4551
+ messages: messages$O,
4570
4552
  errors: errors$b,
4571
4553
  gift: gift$2,
4572
4554
  redeem: redeem$2
4573
4555
  };
4574
4556
 
4575
- var labels$D = {
4557
+ var labels$L = {
4576
4558
  title: "Voulez-vous mettre à jour votre profil ?",
4577
4559
  subtitle: "Entrez vos informations ci-dessous pour mettre à jour votre profil",
4578
4560
  email: "Address courriel",
@@ -4591,21 +4573,21 @@ var labels$D = {
4591
4573
  zoom: "Zoom",
4592
4574
  tin: "Numéro d'identification fiscale"
4593
4575
  };
4594
- var messages$I = {
4576
+ var messages$N = {
4595
4577
  userUpdated: "Votre profil a été mis à jour avec succès.",
4596
4578
  pictureRemoved: "Votre photo de profil a été supprimée avec succès.",
4597
4579
  pictureUpdated: "Votre photo de profil a été mise à jour avec succès."
4598
4580
  };
4599
4581
  var userEdit_fr = {
4600
- labels: labels$D,
4601
- messages: messages$I
4582
+ labels: labels$L,
4583
+ messages: messages$N
4602
4584
  };
4603
4585
 
4604
4586
  var title$o = "Entrez votre adresse de livraison";
4605
4587
  var titleGifting$2 = "Entrez votre adresse";
4606
4588
  var selectAddressTitle$2 = "Veuillez sélectionner une adresse";
4607
4589
  var selectAddressSubtitle$2 = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
4608
- var labels$C = {
4590
+ var labels$K = {
4609
4591
  address: "Adresse",
4610
4592
  code: "Code postal / Zip",
4611
4593
  city: "Ville",
@@ -4616,12 +4598,12 @@ var labels$C = {
4616
4598
  required: "Champs obligatoires",
4617
4599
  isDefault: "Définir par défaut"
4618
4600
  };
4619
- var buttons$d = {
4601
+ var buttons$g = {
4620
4602
  submit: "Valider",
4621
4603
  selectAddress: "Choisir cette adresse",
4622
4604
  addAddress: "Ajouter une nouvelle adresse"
4623
4605
  };
4624
- var messages$H = {
4606
+ var messages$M = {
4625
4607
  addressUpdated: "Votre adresse a été mise à jour avec succès",
4626
4608
  subRedeemed: "Votre abonnement a bien été activé."
4627
4609
  };
@@ -4630,9 +4612,9 @@ var address_fr = {
4630
4612
  titleGifting: titleGifting$2,
4631
4613
  selectAddressTitle: selectAddressTitle$2,
4632
4614
  selectAddressSubtitle: selectAddressSubtitle$2,
4633
- labels: labels$C,
4634
- buttons: buttons$d,
4635
- messages: messages$H
4615
+ labels: labels$K,
4616
+ buttons: buttons$g,
4617
+ messages: messages$M
4636
4618
  };
4637
4619
 
4638
4620
  var title$n = "Réinitialiser votre mot de passe";
@@ -4660,7 +4642,7 @@ var password$4 = "Mot de passe";
4660
4642
  var submit$a = "Soumettre";
4661
4643
  var required$a = "Champs obligatoires";
4662
4644
  var passwordResetEmailSent$2 = "Un lien pour réinitialiser votre mot de passe vous a été envoyé. Si vous ne le recevez pas, vérifier votre courrier indésirable.";
4663
- var messages$G = {
4645
+ var messages$L = {
4664
4646
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4665
4647
  loginHere: "Connectez-vous ici"
4666
4648
  };
@@ -4671,7 +4653,7 @@ var passwordForgot_fr = {
4671
4653
  submit: submit$a,
4672
4654
  required: required$a,
4673
4655
  passwordResetEmailSent: passwordResetEmailSent$2,
4674
- messages: messages$G
4656
+ messages: messages$L
4675
4657
  };
4676
4658
 
4677
4659
  var title$l = "Changez votre mot de passe";
@@ -4699,7 +4681,7 @@ var title$k = "Connexion sans mot de passe";
4699
4681
  var email$6 = "Entrez votre adresse courriel";
4700
4682
  var submit$8 = "Soumettre";
4701
4683
  var required$8 = "Champs obligatoires";
4702
- var messages$F = {
4684
+ var messages$K = {
4703
4685
  PasswordlessLoginSuccess: "Vous avez été authentifié avec succès avec la connexion sans mot de passe"
4704
4686
  };
4705
4687
  var passwordlessRequest_fr = {
@@ -4707,7 +4689,7 @@ var passwordlessRequest_fr = {
4707
4689
  email: email$6,
4708
4690
  submit: submit$8,
4709
4691
  required: required$8,
4710
- messages: messages$F
4692
+ messages: messages$K
4711
4693
  };
4712
4694
 
4713
4695
  var title$j = "Votre panier";
@@ -4735,13 +4717,13 @@ var cart_fr = {
4735
4717
  removeAll: removeAll$2
4736
4718
  };
4737
4719
 
4738
- var buttons$c = {
4720
+ var buttons$f = {
4739
4721
  select: "Choisir",
4740
4722
  added: "Ajouté au panier",
4741
4723
  purchase: "Acheter",
4742
4724
  "continue": "Continuer au contenu"
4743
4725
  };
4744
- var messages$E = {
4726
+ var messages$J = {
4745
4727
  orderConfirmed: {
4746
4728
  title: "Votre commande est confirmée !",
4747
4729
  body: "Votre commande a été confirmée et vous sera expédiée dans les prochains jours. Vous recevrez un courriel de confirmation sous peu."
@@ -4750,17 +4732,17 @@ var messages$E = {
4750
4732
  multipleCurrencies: "Votre panier contient des articles disponibles dans différentes devises. Avant de passer à la caisse, veuillez vous assurer que tous les articles ont la même devise.",
4751
4733
  currencyMismatch: "Les articles sélectionnés ne sont pas compatibles avec la devise associée à votre compte ({{currency}}). Veuillez choisir des articles uniquement offerts dans cette devise."
4752
4734
  };
4753
- var labels$B = {
4735
+ var labels$J = {
4754
4736
  summary: "récapitulatif de commande",
4755
4737
  total: "total"
4756
4738
  };
4757
4739
  var shop_fr = {
4758
- buttons: buttons$c,
4759
- messages: messages$E,
4760
- labels: labels$B
4740
+ buttons: buttons$f,
4741
+ messages: messages$J,
4742
+ labels: labels$J
4761
4743
  };
4762
4744
 
4763
- var labels$A = {
4745
+ var labels$I = {
4764
4746
  cardNumber: "Numéro de carte",
4765
4747
  securityCode: "Code de sécurité",
4766
4748
  submit: "Soumettre",
@@ -4782,7 +4764,7 @@ var labels$A = {
4782
4764
  title: "Informations de paiement"
4783
4765
  }
4784
4766
  };
4785
- var messages$D = {
4767
+ var messages$I = {
4786
4768
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
4787
4769
  cancel: "Annuler votre abonnement en ligne à tout moment.",
4788
4770
  giftSent: "Le cadeau d’abonnement a été envoyé à",
@@ -4796,12 +4778,12 @@ var errors$a = {
4796
4778
  "": ""
4797
4779
  };
4798
4780
  var payment_fr = {
4799
- labels: labels$A,
4800
- messages: messages$D,
4781
+ labels: labels$I,
4782
+ messages: messages$I,
4801
4783
  errors: errors$a
4802
4784
  };
4803
4785
 
4804
- var labels$z = {
4786
+ var labels$H = {
4805
4787
  menu: "Menu Pelcro",
4806
4788
  name: "Nom",
4807
4789
  email: "Courriel",
@@ -4887,9 +4869,12 @@ var labels$z = {
4887
4869
  },
4888
4870
  subCancellation: {
4889
4871
  goBack: "Retourner"
4872
+ },
4873
+ donationCancellation: {
4874
+ goBack: "Go back"
4890
4875
  }
4891
4876
  };
4892
- var messages$C = {
4877
+ var messages$H = {
4893
4878
  noCard: "Vous n’avez pas une carte",
4894
4879
  subCancellation: {
4895
4880
  isSureToCancel: "Êtes-vous certain de vouloir annuler votre abonnement?",
@@ -4906,19 +4891,35 @@ var messages$C = {
4906
4891
  loading: "Annulation de la suspension de votre abonnement",
4907
4892
  success: "L'abonnement a été suspendu avec succès",
4908
4893
  error: "Erreur lors de l'annulation de la suspension de votre abonnement"
4894
+ },
4895
+ donationCancellation: {
4896
+ isSureToCancel: "Êtes-vous certain de vouloir annuler votre don?",
4897
+ loading: "Annulation de l'don",
4898
+ success: "L'don a été annulé avec succès",
4899
+ error: "Une erreur s'est produite lors de l'annulation de l'don"
4900
+ },
4901
+ donationReactivation: {
4902
+ success: "L'don a été réactivé avec succès",
4903
+ error: "Erreur lors de la réactivation de votre don"
4904
+ },
4905
+ donationUnSuspend: {
4906
+ isSureToUnSuspend: "Êtes-vous sûr de vouloir annuler la suspension de votre don ?",
4907
+ loading: "Annulation de la suspension de votre don",
4908
+ success: "L'don a été suspendu avec succès",
4909
+ error: "Erreur lors de l'annulation de la suspension de votre don"
4909
4910
  }
4910
4911
  };
4911
4912
  var dashboard_fr = {
4912
- labels: labels$z,
4913
- messages: messages$C
4913
+ labels: labels$H,
4914
+ messages: messages$H
4914
4915
  };
4915
4916
 
4916
- var messages$B = {
4917
+ var messages$G = {
4917
4918
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4918
4919
  loginHere: "Connectez-vous ici",
4919
4920
  checkbox: "Cochez cette case pour offrir cet abonnement"
4920
4921
  };
4921
- var labels$y = {
4922
+ var labels$G = {
4922
4923
  plan: {
4923
4924
  title: "Abonnez-vous à un plan",
4924
4925
  subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
@@ -4935,15 +4936,48 @@ var labels$y = {
4935
4936
  or: "Sinon, jetez un coup d'oeil à d'autres offres ci-dessous"
4936
4937
  }
4937
4938
  };
4938
- var buttons$b = {
4939
+ var buttons$e = {
4939
4940
  next: "Prochain",
4940
4941
  select: "Choisir",
4941
4942
  back: "Retour"
4942
4943
  };
4943
4944
  var select_fr = {
4944
- messages: messages$B,
4945
- labels: labels$y,
4946
- buttons: buttons$b
4945
+ messages: messages$G,
4946
+ labels: labels$G,
4947
+ buttons: buttons$e
4948
+ };
4949
+
4950
+ var messages$F = {
4951
+ alreadyHaveAccount: "Vous avez déjà un compte ?",
4952
+ loginHere: "Connectez-vous ici",
4953
+ checkbox: "Cochez cette case pour offrir cet abonnement"
4954
+ };
4955
+ var labels$F = {
4956
+ plan: {
4957
+ title: "Abonnez-vous à un plan",
4958
+ subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
4959
+ },
4960
+ product: {
4961
+ title: "Abonnez-vous à un produit",
4962
+ subtitle: "Sélectionnez l’un des produits ci-dessous et cliquez sur suivant."
4963
+ },
4964
+ selectProduct: "Sélectionnez un produit",
4965
+ selectPlan: "Sélectionnez un plan",
4966
+ starningAt: "À partir de",
4967
+ restrictiveArticles: {
4968
+ subscribeTo: "Abonnez-vous à une des options suivantes pour accéder au contenu de cette page",
4969
+ or: "Sinon, jetez un coup d'oeil à d'autres offres ci-dessous"
4970
+ }
4971
+ };
4972
+ var buttons$d = {
4973
+ next: "Prochain",
4974
+ select: "Choisir",
4975
+ back: "Retour"
4976
+ };
4977
+ var donation_fr = {
4978
+ messages: messages$F,
4979
+ labels: labels$F,
4980
+ buttons: buttons$d
4947
4981
  };
4948
4982
 
4949
4983
  var confirm$6 = {
@@ -4956,46 +4990,85 @@ var notification_fr = {
4956
4990
  confirm: confirm$6
4957
4991
  };
4958
4992
 
4959
- var labels$x = {
4993
+ var labels$E = {
4960
4994
  title: "Confirmez votre courriel",
4961
4995
  instructions: "Confirmez votre courriel.\nVeuillez cliquer sur le lien de vérification, qui vous a été envoyé à:",
4962
4996
  resend: "Renvoyer le courriel"
4963
4997
  };
4964
- var messages$A = {
4998
+ var messages$E = {
4965
4999
  resent: "Renvoyé avec succès",
4966
5000
  success: "Adresse courriel vérifiée avec succès"
4967
5001
  };
4968
5002
  var verifyEmail_fr = {
4969
- labels: labels$x,
4970
- messages: messages$A
5003
+ labels: labels$E,
5004
+ messages: messages$E
4971
5005
  };
4972
5006
 
4973
5007
  var title$i = "Détails de la facture";
4974
- var labels$w = {
5008
+ var labels$D = {
4975
5009
  summary: "Résumé",
4976
5010
  total: "Total",
4977
5011
  amountPaid: "Montant payé",
4978
5012
  amountDue: "Montant dû",
4979
5013
  creationDate: "Créé le:"
4980
5014
  };
4981
- var buttons$a = {
5015
+ var buttons$c = {
4982
5016
  download: "Télécharger",
4983
5017
  pay: "Payer"
4984
5018
  };
4985
5019
  var invoiceDetails_fr = {
4986
5020
  title: title$i,
4987
- labels: labels$w,
4988
- buttons: buttons$a
5021
+ labels: labels$D,
5022
+ buttons: buttons$c
4989
5023
  };
4990
5024
 
4991
- var labels$v = {
5025
+ var labels$C = {
5026
+ title: "Annuler l'abonnement",
5027
+ cancelReason: "Motif d'annulation",
5028
+ subCancellation: {
5029
+ goBack: "Retourner"
5030
+ }
5031
+ };
5032
+ var messages$D = {
5033
+ subscriptionEnd: "Cet abonnement doit expirer le",
5034
+ cancelNow: "Cancel Subscription Now",
5035
+ cancelLater: "Annuler l'abonnement maintenant",
5036
+ subCancellation: {
5037
+ isSureToCancelNow: "Êtes-vous sûr de vouloir résilier votre abonnement immédiatement?",
5038
+ isSureToCancel: "Êtes-vous sûr de vouloir résilier votre abonnement?",
5039
+ loading: "Annulation de votre abonnement",
5040
+ success: "L'abonnement a été annulé avec succès",
5041
+ error: "Erreur lors de l'annulation de votre abonnement"
5042
+ }
5043
+ };
5044
+ var subscriptionCancel_fr = {
5045
+ labels: labels$C,
5046
+ messages: messages$D
5047
+ };
5048
+
5049
+ var labels$B = {
5050
+ inviteMembers: "Inviter des membres",
5051
+ listOfMembers: "Liste des membres",
5052
+ invite: "Inviter",
5053
+ remove: "Retirer",
5054
+ emails: "Saisir les e-mails",
5055
+ status: "Statut",
5056
+ actions: "Actions",
5057
+ email: "E-mail",
5058
+ listNote: "Liste séparée par des virgules, par ex."
5059
+ };
5060
+ var subscriptionManageMembers_fr = {
5061
+ labels: labels$B
5062
+ };
5063
+
5064
+ var labels$A = {
4992
5065
  title: "Suspendre l'abonnement",
4993
5066
  suspensionDate: "Date de suspension",
4994
5067
  subCancellation: {
4995
5068
  goBack: "Revenir en arrière"
4996
5069
  }
4997
5070
  };
4998
- var messages$z = {
5071
+ var messages$C = {
4999
5072
  suspensionEnd: "La suspension doit expirer le",
5000
5073
  suspendNow: "Suspendre l'abonnement maintenant",
5001
5074
  suspendLater: "Suspendre à la fin de la période",
@@ -5008,8 +5081,8 @@ var messages$z = {
5008
5081
  }
5009
5082
  };
5010
5083
  var subscriptionSuspend_fr = {
5011
- labels: labels$v,
5012
- messages: messages$z
5084
+ labels: labels$A,
5085
+ messages: messages$C
5013
5086
  };
5014
5087
 
5015
5088
  var validation$1 = {
@@ -5023,7 +5096,7 @@ var validation$1 = {
5023
5096
  enterLastName: "성은 필수 항목입니다.",
5024
5097
  enterPhone: "전화번호는 필수 항목입니다."
5025
5098
  };
5026
- var buttons$9 = {
5099
+ var buttons$b = {
5027
5100
  account: "내 계정",
5028
5101
  login: "로그인",
5029
5102
  subscribe: "구독하다"
@@ -5101,7 +5174,7 @@ var confirm$5 = {
5101
5174
  };
5102
5175
  var common_ko = {
5103
5176
  validation: validation$1,
5104
- buttons: buttons$9,
5177
+ buttons: buttons$b,
5105
5178
  dashboard: dashboard$2,
5106
5179
  select: select$3,
5107
5180
  confirm: confirm$5
@@ -5132,7 +5205,7 @@ var paymentMethod_ko = {
5132
5205
  var title$h = "Frieze 뉴스레터를 구독하려면 이메일을 입력하세요.";
5133
5206
  var updateTitle$1 = "뉴스레터 선택 업데이트";
5134
5207
  var subtitle$7 = "귀하의 이메일은 다른 마케팅 용도로도 사용됩니다.";
5135
- var labels$u = {
5208
+ var labels$z = {
5136
5209
  submit: "제출",
5137
5210
  firstName: "이름",
5138
5211
  lastName: "성",
@@ -5140,7 +5213,7 @@ var labels$u = {
5140
5213
  postalCode: "우편번호",
5141
5214
  required: "필수 항목"
5142
5215
  };
5143
- var messages$y = {
5216
+ var messages$B = {
5144
5217
  alreadyHaveAccount: "이미 계정이 있습니까?",
5145
5218
  success: "뉴스레터가 성공적으로 업데이트되었습니다.",
5146
5219
  loginHere: "여기에서 로그인하세요.",
@@ -5151,14 +5224,14 @@ var newsletter_ko = {
5151
5224
  title: title$h,
5152
5225
  updateTitle: updateTitle$1,
5153
5226
  subtitle: subtitle$7,
5154
- labels: labels$u,
5155
- messages: messages$y
5227
+ labels: labels$z,
5228
+ messages: messages$B
5156
5229
  };
5157
5230
 
5158
- var labels$t = {
5231
+ var labels$y = {
5159
5232
  "continue": "콘텐츠로 돌아가기"
5160
5233
  };
5161
- var messages$x = {
5234
+ var messages$A = {
5162
5235
  yourFreeTrial: "유료 멤버십에 가입하셨습니다!",
5163
5236
  youHaveAccess: "멤버십 혜택을 즐기시기를 바라며, 질문이나 문의 사항이 있으면 저희에게 연락주십시오.",
5164
5237
  clickToLearn: {
@@ -5184,12 +5257,12 @@ var errors$9 = {
5184
5257
  "": ""
5185
5258
  };
5186
5259
  var success_ko = {
5187
- labels: labels$t,
5188
- messages: messages$x,
5260
+ labels: labels$y,
5261
+ messages: messages$A,
5189
5262
  errors: errors$9
5190
5263
  };
5191
5264
 
5192
- var messages$w = {
5265
+ var messages$z = {
5193
5266
  freeVisits: "남은 무료 방문 기간:",
5194
5267
  subscribeNow: "멤버십 가입",
5195
5268
  alreadyHaveAccount: "이미 계정이 있습니까?",
@@ -5199,16 +5272,16 @@ var errors$8 = {
5199
5272
  "": ""
5200
5273
  };
5201
5274
  var meter_ko = {
5202
- messages: messages$w,
5275
+ messages: messages$z,
5203
5276
  errors: errors$8
5204
5277
  };
5205
5278
 
5206
- var messages$v = {
5279
+ var messages$y = {
5207
5280
  youAreSafe: "PCI 준수 128비트 SSL 인증서로 보호됩니다. 제공: ",
5208
5281
  bankRedirection: "잠시만 기다려 주십시오. 결제 은행으로 연결 중입니다.",
5209
5282
  bankAuthenticationSuccess: "요청을 처리하는 동안 기다려 주십시오."
5210
5283
  };
5211
- var labels$s = {
5284
+ var labels$x = {
5212
5285
  card: "카드 번호 입력",
5213
5286
  date: "만료일",
5214
5287
  CVC: "CVC",
@@ -5228,11 +5301,13 @@ var labels$s = {
5228
5301
  firstName: "이름",
5229
5302
  lastName: "성",
5230
5303
  phone: "핸드폰",
5231
- freeItems: "무료 아이템"
5304
+ freeItems: "무료 아이템",
5305
+ email: "이메일",
5306
+ password: "비밀번호"
5232
5307
  };
5233
5308
  var checkoutForm_ko = {
5234
- messages: messages$v,
5235
- labels: labels$s
5309
+ messages: messages$y,
5310
+ labels: labels$x
5236
5311
  };
5237
5312
 
5238
5313
  var youAreSafe$1 = "PCI 준수 128비트 SSL 인증서로 보호됩니다. 제공: ";
@@ -5256,7 +5331,7 @@ var messages_ko = {
5256
5331
  zeroTotalInvoice: zeroTotalInvoice$1
5257
5332
  };
5258
5333
 
5259
- var labels$r = {
5334
+ var labels$w = {
5260
5335
  email: "이메일 입력",
5261
5336
  username: "사용자 이름 입력",
5262
5337
  password: "비밀번호 입력",
@@ -5265,7 +5340,7 @@ var labels$r = {
5265
5340
  passwordPlaceholder: "비밀번호",
5266
5341
  login: "로그인"
5267
5342
  };
5268
- var messages$u = {
5343
+ var messages$x = {
5269
5344
  loginTo: "귀하의 계정에 로그인",
5270
5345
  welcome: "반갑습니다. 귀하의 기존 계정으로 로그인하세요.",
5271
5346
  dontHaveAccount: "아직 계정이 없으신가요?",
@@ -5284,28 +5359,28 @@ var errors$7 = {
5284
5359
  "": ""
5285
5360
  };
5286
5361
  var login_ko = {
5287
- labels: labels$r,
5288
- messages: messages$u,
5362
+ labels: labels$w,
5363
+ messages: messages$x,
5289
5364
  errors: errors$7
5290
5365
  };
5291
5366
 
5292
- var labels$q = {
5367
+ var labels$v = {
5293
5368
  title: "비밀번호 없는 링크 확인",
5294
5369
  instructions: "가는 중입니다!\n이메일 주소를 확인하겠습니다.\n이메일로 전송된 확인 링크를 클릭하세요.",
5295
5370
  resend: "이메일 재전송"
5296
5371
  };
5297
- var messages$t = {
5372
+ var messages$w = {
5298
5373
  resent: "성공적으로 재전송",
5299
5374
  success: "성공적으로 로그인했습니다"
5300
5375
  };
5301
5376
  var verifyLinkToken_ko = {
5302
- labels: labels$q,
5303
- messages: messages$t
5377
+ labels: labels$v,
5378
+ messages: messages$w
5304
5379
  };
5305
5380
 
5306
5381
  var title$g = "계정 만들기";
5307
5382
  var subtitle$6 = "아래에 이메일과 비밀번호를 입력하세요.";
5308
- var labels$p = {
5383
+ var labels$u = {
5309
5384
  signUpFacebook: "Facebook으로 가입하기",
5310
5385
  signUpGoogle: "Google로 가입하기",
5311
5386
  signUpEmail: "이메일로 가입하기",
@@ -5318,7 +5393,7 @@ var labels$p = {
5318
5393
  lastName: "성",
5319
5394
  phone: "핸드폰"
5320
5395
  };
5321
- var messages$s = {
5396
+ var messages$v = {
5322
5397
  alreadyHaveAccount: "이미 계정이 있습니까?",
5323
5398
  createAccount: "계정 만들기",
5324
5399
  loginHere: "여기에서 로그인하세요.",
@@ -5392,14 +5467,14 @@ var redeem$1 = {
5392
5467
  var register_ko = {
5393
5468
  title: title$g,
5394
5469
  subtitle: subtitle$6,
5395
- labels: labels$p,
5396
- messages: messages$s,
5470
+ labels: labels$u,
5471
+ messages: messages$v,
5397
5472
  errors: errors$6,
5398
5473
  gift: gift$1,
5399
5474
  redeem: redeem$1
5400
5475
  };
5401
5476
 
5402
- var labels$o = {
5477
+ var labels$t = {
5403
5478
  title: "프로파일을 업데이트하시겠습니까?",
5404
5479
  subtitle: "프로필을 업데이트하려면 아래 정보를 입력하세요.",
5405
5480
  email: "이메일",
@@ -5418,21 +5493,21 @@ var labels$o = {
5418
5493
  zoom: "확대",
5419
5494
  tin: "세금 식별 번호"
5420
5495
  };
5421
- var messages$r = {
5496
+ var messages$u = {
5422
5497
  userUpdated: "감사합니다! 프로필이 성공적으로 업데이트되었습니다.",
5423
5498
  pictureRemoved: "귀하의 프로필 사진이 제거되었습니다.",
5424
5499
  pictureUpdated: "귀하의 프로필 사진이 업데이트되었습니다."
5425
5500
  };
5426
5501
  var userEdit_ko = {
5427
- labels: labels$o,
5428
- messages: messages$r
5502
+ labels: labels$t,
5503
+ messages: messages$u
5429
5504
  };
5430
5505
 
5431
5506
  var title$f = "배송 주소를 입력하십시오.";
5432
5507
  var titleGifting$1 = "주소를 입력하세요";
5433
5508
  var selectAddressTitle$1 = "주소를 선택하십시오.";
5434
5509
  var selectAddressSubtitle$1 = "저장된 주소에서 선택하거나 새 주소를 추가하십시오.";
5435
- var labels$n = {
5510
+ var labels$s = {
5436
5511
  address: "주소",
5437
5512
  code: "우편번호",
5438
5513
  city: "도시",
@@ -5443,12 +5518,12 @@ var labels$n = {
5443
5518
  required: "필수 항목",
5444
5519
  isDefault: "기본값으로 설정"
5445
5520
  };
5446
- var buttons$8 = {
5521
+ var buttons$a = {
5447
5522
  submit: "제출",
5448
5523
  selectAddress: "주소 선택",
5449
5524
  addAddress: "새 주소 추가"
5450
5525
  };
5451
- var messages$q = {
5526
+ var messages$t = {
5452
5527
  addressUpdated: "주소가 성공적으로 업데이트되었습니다!",
5453
5528
  subRedeemed: "귀하의 유료 멤버십이 사용되었습니다."
5454
5529
  };
@@ -5457,9 +5532,9 @@ var address_ko = {
5457
5532
  titleGifting: titleGifting$1,
5458
5533
  selectAddressTitle: selectAddressTitle$1,
5459
5534
  selectAddressSubtitle: selectAddressSubtitle$1,
5460
- labels: labels$n,
5461
- buttons: buttons$8,
5462
- messages: messages$q
5535
+ labels: labels$s,
5536
+ buttons: buttons$a,
5537
+ messages: messages$t
5463
5538
  };
5464
5539
 
5465
5540
  var title$e = "비밀번호 재설정";
@@ -5487,7 +5562,7 @@ var password$2 = "비밀번호";
5487
5562
  var submit$6 = "제출";
5488
5563
  var required$6 = "필수 항목";
5489
5564
  var passwordResetEmailSent$1 = "비밀번호 재설정 안내가 귀하의 이메일로 발송되었습니다.";
5490
- var messages$p = {
5565
+ var messages$s = {
5491
5566
  alreadyHaveAccount: "이미 계정이 있습니까?",
5492
5567
  loginHere: "여기에서 로그인하세요."
5493
5568
  };
@@ -5498,7 +5573,7 @@ var passwordForgot_ko = {
5498
5573
  submit: submit$6,
5499
5574
  required: required$6,
5500
5575
  passwordResetEmailSent: passwordResetEmailSent$1,
5501
- messages: messages$p
5576
+ messages: messages$s
5502
5577
  };
5503
5578
 
5504
5579
  var title$c = "비밀번호를 변경합니다.";
@@ -5526,7 +5601,7 @@ var title$b = "비밀번호 없는 로그인";
5526
5601
  var email$3 = "이메일 입력";
5527
5602
  var submit$4 = "제출";
5528
5603
  var required$4 = "필수 항목";
5529
- var messages$o = {
5604
+ var messages$r = {
5530
5605
  PasswordlessLoginSuccess: "비밀번호 없는 로그인으로 성공적으로 인증되었습니다."
5531
5606
  };
5532
5607
  var passwordlessRequest_ko = {
@@ -5534,7 +5609,7 @@ var passwordlessRequest_ko = {
5534
5609
  email: email$3,
5535
5610
  submit: submit$4,
5536
5611
  required: required$4,
5537
- messages: messages$o
5612
+ messages: messages$r
5538
5613
  };
5539
5614
 
5540
5615
  var title$a = "귀하의 장바구니";
@@ -5562,13 +5637,13 @@ var cart_ko = {
5562
5637
  removeAll: removeAll$1
5563
5638
  };
5564
5639
 
5565
- var buttons$7 = {
5640
+ var buttons$9 = {
5566
5641
  select: "선택",
5567
5642
  added: "장바구니에 추가",
5568
5643
  purchase: "구매",
5569
5644
  "continue": "계속"
5570
5645
  };
5571
- var messages$n = {
5646
+ var messages$q = {
5572
5647
  orderConfirmed: {
5573
5648
  title: "주문이 확인되었습니다!",
5574
5649
  body: "귀하의 주문이 확인되었으며 며칠 안에 배송될 예정입니다. 이 주문의 확인 이메일이 귀하에게 전송됩니다."
@@ -5577,17 +5652,17 @@ var messages$n = {
5577
5652
  multipleCurrencies: "장바구니에 다른 통화로만 결제가 가능한 아이템이 있습니다. 결제를 계속 진행하려면 모든 아이템의 결제 통화가 동일한지 확인하십시오.",
5578
5653
  currencyMismatch: "선택하신 아이템(들)이 귀하가 설정한 기본 통화({{currency}})와 일치하지 않습니다. 기본 통화와 일치하는 아이템(들)만 선택하십시오."
5579
5654
  };
5580
- var labels$m = {
5655
+ var labels$r = {
5581
5656
  summary: "주문 요약",
5582
5657
  total: "총계"
5583
5658
  };
5584
5659
  var shop_ko = {
5585
- buttons: buttons$7,
5586
- messages: messages$n,
5587
- labels: labels$m
5660
+ buttons: buttons$9,
5661
+ messages: messages$q,
5662
+ labels: labels$r
5588
5663
  };
5589
5664
 
5590
- var labels$l = {
5665
+ var labels$q = {
5591
5666
  cardNumber: "카드 번호",
5592
5667
  securityCode: "보안 코드",
5593
5668
  submit: "제출",
@@ -5609,7 +5684,7 @@ var labels$l = {
5609
5684
  title: "결제 정보"
5610
5685
  }
5611
5686
  };
5612
- var messages$m = {
5687
+ var messages$p = {
5613
5688
  youAreSafe: "PCI 준수 128비트 SSL 인증서로 보호됩니다. 제공: ",
5614
5689
  cancel: "유료 멤버십은 언제든 온라인으로 취소가 가능합니다.",
5615
5690
  giftSent: "유료 멤버십 선물이 ",
@@ -5623,12 +5698,12 @@ var errors$5 = {
5623
5698
  "": ""
5624
5699
  };
5625
5700
  var payment_ko = {
5626
- labels: labels$l,
5627
- messages: messages$m,
5701
+ labels: labels$q,
5702
+ messages: messages$p,
5628
5703
  errors: errors$5
5629
5704
  };
5630
5705
 
5631
- var labels$k = {
5706
+ var labels$p = {
5632
5707
  menu: "Pelcro 메뉴",
5633
5708
  name: "이름",
5634
5709
  email: "이메일",
@@ -5776,7 +5851,10 @@ var savedItems = {
5776
5851
  var subCancellation = {
5777
5852
  goBack: "뒤로 가기"
5778
5853
  };
5779
- var messages$l = {
5854
+ var donationCancellation = {
5855
+ goBack: "뒤로 가기"
5856
+ };
5857
+ var messages$o = {
5780
5858
  noCard: "등록된 카드가 없습니다.",
5781
5859
  subCancellation: {
5782
5860
  isSureToCancel: "정말로 유료 멤버십을 취소하시겠습니까?",
@@ -5793,10 +5871,26 @@ var messages$l = {
5793
5871
  loading: "구독 일시 중단 해제",
5794
5872
  success: "구독이 성공적으로 일시 중단 해제되었습니다",
5795
5873
  error: "구독 일시 중단을 해제하는 동안 오류가 발생했습니다."
5874
+ },
5875
+ donationCancellation: {
5876
+ isSureToCancel: "정말로 유료 멤버십을 취소하시겠습니까?",
5877
+ loading: "귀하의 유료 멤버십을 취소합니다.",
5878
+ success: "유료 멤버십이 성공적으로 취소되었습니다.",
5879
+ error: "유료 멤버십 취소 과정에서 오류가 발생했습니다."
5880
+ },
5881
+ donationReactivation: {
5882
+ success: "구독이 성공적으로 재활성화되었습니다.",
5883
+ error: "구독을 재활성화하는 동안 오류가 발생했습니다."
5884
+ },
5885
+ donationUnSuspend: {
5886
+ isSureToUnSuspend: "구독 일시 중단을 해제하시겠습니까?",
5887
+ loading: "구독 일시 중단 해제",
5888
+ success: "구독이 성공적으로 일시 중단 해제되었습니다",
5889
+ error: "구독 일시 중단을 해제하는 동안 오류가 발생했습니다."
5796
5890
  }
5797
5891
  };
5798
5892
  var dashboard_ko = {
5799
- labels: labels$k,
5893
+ labels: labels$p,
5800
5894
  shipments: shipments,
5801
5895
  logout: logout,
5802
5896
  dashboard: dashboard$1,
@@ -5845,15 +5939,16 @@ var dashboard_ko = {
5845
5939
  orders: orders,
5846
5940
  savedItems: savedItems,
5847
5941
  subCancellation: subCancellation,
5848
- messages: messages$l
5942
+ donationCancellation: donationCancellation,
5943
+ messages: messages$o
5849
5944
  };
5850
5945
 
5851
- var messages$k = {
5946
+ var messages$n = {
5852
5947
  alreadyHaveAccount: "이미 계정이 있습니까?",
5853
5948
  loginHere: "여기에서 로그인하세요.",
5854
5949
  checkbox: "이 유료 멤버십을 선물하려면 체크하세요."
5855
5950
  };
5856
- var labels$j = {
5951
+ var labels$o = {
5857
5952
  plan: {
5858
5953
  title: "요금제 가입하기",
5859
5954
  subtitle: "아래 요금제 중 하나를 선택하고 다음을 클릭하세요."
@@ -5870,67 +5965,139 @@ var labels$j = {
5870
5965
  or: "아래에서 다른 상품을 선택해주시기 바랍니다."
5871
5966
  }
5872
5967
  };
5873
- var buttons$6 = {
5968
+ var buttons$8 = {
5874
5969
  next: "다음",
5875
5970
  select: "선택",
5876
5971
  back: "뒤로"
5877
5972
  };
5878
5973
  var select_ko = {
5879
- messages: messages$k,
5880
- labels: labels$j,
5881
- buttons: buttons$6
5974
+ messages: messages$n,
5975
+ labels: labels$o,
5976
+ buttons: buttons$8
5882
5977
  };
5883
5978
 
5884
- var confirm$3 = {
5885
- labels: {
5886
- confirm: "확인",
5887
- close: "닫기"
5888
- }
5889
- };
5890
- var notification_ko = {
5891
- confirm: confirm$3
5979
+ var messages$m = {
5980
+ alreadyHaveAccount: "이미 계정이 있습니까?",
5981
+ loginHere: "여기에서 로그인하세요.",
5982
+ checkbox: "이 유료 멤버십을 선물하려면 체크하세요."
5892
5983
  };
5893
-
5894
- var labels$i = {
5895
- title: "이메일 주소를 인증하세요.",
5984
+ var labels$n = {
5985
+ plan: {
5986
+ title: "요금제 가입하기",
5987
+ subtitle: "아래 요금제 중 하나를 선택하고 다음을 클릭하세요."
5988
+ },
5989
+ product: {
5990
+ title: "상품 가입하기",
5991
+ subtitle: "아래 상품 중 하나를 선택하고 다음을 클릭하세요."
5992
+ },
5993
+ selectProduct: "상품 선택",
5994
+ selectPlan: "요금제 선택",
5995
+ startingAt: "시작일:",
5996
+ restrictiveArticles: {
5997
+ subscribeTo: "이 페이지에 액세스하려면 다음 요금제 중 하나에 가입하거나",
5998
+ or: "아래에서 다른 상품을 선택해주시기 바랍니다."
5999
+ }
6000
+ };
6001
+ var buttons$7 = {
6002
+ next: "다음",
6003
+ select: "선택",
6004
+ back: "뒤로"
6005
+ };
6006
+ var donation_ko = {
6007
+ messages: messages$m,
6008
+ labels: labels$n,
6009
+ buttons: buttons$7
6010
+ };
6011
+
6012
+ var confirm$3 = {
6013
+ labels: {
6014
+ confirm: "확인",
6015
+ close: "닫기"
6016
+ }
6017
+ };
6018
+ var notification_ko = {
6019
+ confirm: confirm$3
6020
+ };
6021
+
6022
+ var labels$m = {
6023
+ title: "이메일 주소를 인증하세요.",
5896
6024
  instructions: "거의 완료되었습니다!\n이메일 주소만 인증하면 됩니다.\n다음 이메일 주소로 전송된 인증 링크를 클릭해 주십시오:",
5897
6025
  resend: "이메일 재전송"
5898
6026
  };
5899
- var messages$j = {
6027
+ var messages$l = {
5900
6028
  resent: "재전송 완료",
5901
6029
  success: "이메일 주소가 인증되었습니다!"
5902
6030
  };
5903
6031
  var verifyEmail_ko = {
5904
- labels: labels$i,
5905
- messages: messages$j
6032
+ labels: labels$m,
6033
+ messages: messages$l
5906
6034
  };
5907
6035
 
5908
6036
  var title$9 = "인보이스 세부 정보";
5909
- var labels$h = {
6037
+ var labels$l = {
5910
6038
  summary: "요약",
5911
6039
  total: "총계",
5912
6040
  amountPaid: "지불된 금액",
5913
6041
  amountDue: "지불액",
5914
6042
  creationDate: "생성일:"
5915
6043
  };
5916
- var buttons$5 = {
6044
+ var buttons$6 = {
5917
6045
  download: "다운로드",
5918
6046
  pay: "지금 지불"
5919
6047
  };
5920
6048
  var invoiceDetails_ko = {
5921
6049
  title: title$9,
5922
- labels: labels$h,
5923
- buttons: buttons$5
6050
+ labels: labels$l,
6051
+ buttons: buttons$6
5924
6052
  };
5925
6053
 
5926
- var labels$g = {
6054
+ var labels$k = {
6055
+ title: "구독 취소",
6056
+ cancelReason: "취소 사유",
6057
+ subCancellation: {
6058
+ goBack: "돌아가기"
6059
+ }
6060
+ };
6061
+ var messages$k = {
6062
+ subscriptionEnd: "이 구독은 다음 날짜에 만료되도록 설정되었습니다.",
6063
+ cancelNow: "지금 구독 취소",
6064
+ cancelLater: "기간 종료 시 취소",
6065
+ subCancellation: {
6066
+ isSureToCancelNow: "구독을 즉시 취소하시겠습니까?",
6067
+ isSureToCancel: "구독을 취소하시겠습니까?",
6068
+ loading: "구독 취소",
6069
+ success: "구독이 성공적으로 취소되었습니다.",
6070
+ error: "구독 취소 중 오류 발생"
6071
+ }
6072
+ };
6073
+ var subscriptionCancel_ko = {
6074
+ labels: labels$k,
6075
+ messages: messages$k
6076
+ };
6077
+
6078
+ var labels$j = {
6079
+ inviteMembers: "회원 초대",
6080
+ listOfMembers: "구성원 목록",
6081
+ invite: "초대",
6082
+ remove: "제거하다",
6083
+ emails: "이메일 입력",
6084
+ status: "상태",
6085
+ actions: "행위",
6086
+ email: "이메일",
6087
+ listNote: "쉼표로 구분된 목록입니다."
6088
+ };
6089
+ var subscriptionManageMembers_ko = {
6090
+ labels: labels$j
6091
+ };
6092
+
6093
+ var labels$i = {
5927
6094
  title: "구독 중단",
5928
6095
  suspensionDate: "중단 날짜",
5929
6096
  subCancellation: {
5930
6097
  goBack: "돌아가기"
5931
6098
  }
5932
6099
  };
5933
- var messages$i = {
6100
+ var messages$j = {
5934
6101
  suspensionEnd: "일시 중지가 만료되도록 설정되었습니다.",
5935
6102
  suspendNow: "지금 구독 일시 중단",
5936
6103
  suspendLater: "기간 종료 시 일시 중단",
@@ -5943,8 +6110,8 @@ var messages$i = {
5943
6110
  }
5944
6111
  };
5945
6112
  var subscriptionSuspend_ko = {
5946
- labels: labels$g,
5947
- messages: messages$i
6113
+ labels: labels$i,
6114
+ messages: messages$j
5948
6115
  };
5949
6116
 
5950
6117
  var validation = {
@@ -5956,7 +6123,7 @@ var validation = {
5956
6123
  enterLastName: "El apellido es obligatorio.",
5957
6124
  enterPhone: "El número de teléfono es obligatorio."
5958
6125
  };
5959
- var buttons$4 = {
6126
+ var buttons$5 = {
5960
6127
  account: "Mi cuenta",
5961
6128
  login: "Iniciar Sesión"
5962
6129
  };
@@ -6033,7 +6200,7 @@ var confirm$2 = {
6033
6200
  };
6034
6201
  var common_es = {
6035
6202
  validation: validation,
6036
- buttons: buttons$4,
6203
+ buttons: buttons$5,
6037
6204
  dashboard: dashboard,
6038
6205
  select: select$1,
6039
6206
  confirm: confirm$2
@@ -6064,7 +6231,7 @@ var paymentMethod_es = {
6064
6231
  var title$8 = "Ingresa tu correo para suscribirte a nuestro boletín";
6065
6232
  var updateTitle = "Actualizar selecciones del boletín";
6066
6233
  var subtitle$3 = "Podríamos usar tu dirección de correo para otras comunicaciones de marketing";
6067
- var labels$f = {
6234
+ var labels$h = {
6068
6235
  submit: "Enviar",
6069
6236
  firstName: "Nombre",
6070
6237
  lastName: "Apellido",
@@ -6072,7 +6239,7 @@ var labels$f = {
6072
6239
  postalCode: "Código postal",
6073
6240
  required: "obligatorio"
6074
6241
  };
6075
- var messages$h = {
6242
+ var messages$i = {
6076
6243
  alreadyHaveAccount: "¿Ya tienes una cuenta?",
6077
6244
  success: "El boletín se actualizó con éxito",
6078
6245
  loginHere: "Inicia sesión aquí.",
@@ -6083,14 +6250,14 @@ var newsletter_es = {
6083
6250
  title: title$8,
6084
6251
  updateTitle: updateTitle,
6085
6252
  subtitle: subtitle$3,
6086
- labels: labels$f,
6087
- messages: messages$h
6253
+ labels: labels$h,
6254
+ messages: messages$i
6088
6255
  };
6089
6256
 
6090
- var labels$e = {
6257
+ var labels$g = {
6091
6258
  "continue": "Continuar al contenido"
6092
6259
  };
6093
- var messages$g = {
6260
+ var messages$h = {
6094
6261
  yourFreeTrial: "¡Suscripción exitosa!",
6095
6262
  youHaveAccess: "Esperamos que disfrutes de tu suscripción. Por favor, contáctanos si tienes alguna pregunta o inquietud.",
6096
6263
  clickToLearn: {
@@ -6116,12 +6283,12 @@ var errors$4 = {
6116
6283
  "": ""
6117
6284
  };
6118
6285
  var success_es = {
6119
- labels: labels$e,
6120
- messages: messages$g,
6286
+ labels: labels$g,
6287
+ messages: messages$h,
6121
6288
  errors: errors$4
6122
6289
  };
6123
6290
 
6124
- var messages$f = {
6291
+ var messages$g = {
6125
6292
  freeVisits: "Visitas gratuitas restantes:",
6126
6293
  subscribeNow: "Suscribir",
6127
6294
  alreadyHaveAccount: "¿Ya tienes una cuenta?",
@@ -6131,16 +6298,16 @@ var errors$3 = {
6131
6298
  "": ""
6132
6299
  };
6133
6300
  var meter_es = {
6134
- messages: messages$f,
6301
+ messages: messages$g,
6135
6302
  errors: errors$3
6136
6303
  };
6137
6304
 
6138
- var messages$e = {
6305
+ var messages$f = {
6139
6306
  youAreSafe: "Estás seguro - PCI compliance 128 SSL por",
6140
6307
  bankRedirection: "Por favor, espera, estamos redireccionando a tu banco.",
6141
6308
  bankAuthenticationSuccess: "Por favor, espera un momento mientras procesamos tu solicitud."
6142
6309
  };
6143
- var labels$d = {
6310
+ var labels$f = {
6144
6311
  card: "Ingresar número de tarjeta",
6145
6312
  date: "Vencimiento",
6146
6313
  CVC: "CVC",
@@ -6160,11 +6327,13 @@ var labels$d = {
6160
6327
  firstName: "Nombre",
6161
6328
  lastName: "Apellido",
6162
6329
  phone: "Teléfono",
6163
- freeItems: "Artículos gratis"
6330
+ freeItems: "Artículos gratis",
6331
+ email: "Correo",
6332
+ password: "Contraseña"
6164
6333
  };
6165
6334
  var checkoutForm_es = {
6166
- messages: messages$e,
6167
- labels: labels$d
6335
+ messages: messages$f,
6336
+ labels: labels$f
6168
6337
  };
6169
6338
 
6170
6339
  var youAreSafe = "Estás seguro - PCI compliance 128 SSL por";
@@ -6186,7 +6355,7 @@ var messages_es = {
6186
6355
  zeroTotalInvoice: zeroTotalInvoice
6187
6356
  };
6188
6357
 
6189
- var labels$c = {
6358
+ var labels$e = {
6190
6359
  email: "Ingresar correo",
6191
6360
  password: "Ingresar contraseña",
6192
6361
  required: "obligatorio",
@@ -6194,7 +6363,7 @@ var labels$c = {
6194
6363
  passwordPlaceholder: "Contraseña",
6195
6364
  login: "Iniciar Sesión"
6196
6365
  };
6197
- var messages$d = {
6366
+ var messages$e = {
6198
6367
  loginTo: "Inicia sesión en tu cuenta",
6199
6368
  welcome: "Bienvenido de vuelta, inicia sesión con tu cuenta existente.",
6200
6369
  dontHaveAccount: "¿Aún no tienes una cuenta?",
@@ -6213,28 +6382,28 @@ var errors$2 = {
6213
6382
  "": ""
6214
6383
  };
6215
6384
  var login_es = {
6216
- labels: labels$c,
6217
- messages: messages$d,
6385
+ labels: labels$e,
6386
+ messages: messages$e,
6218
6387
  errors: errors$2
6219
6388
  };
6220
6389
 
6221
- var labels$b = {
6390
+ var labels$d = {
6222
6391
  title: "Verificando Enlace Sin Contraseña",
6223
6392
  instructions: "¡Ya casi terminas!\nVamos a confirmar tu dirección de correo.\nPulsa el enlace de verificación que hemos enviado a tu correo:",
6224
6393
  resend: "Reenviar correo"
6225
6394
  };
6226
- var messages$c = {
6395
+ var messages$d = {
6227
6396
  resent: "Reenvío exitoso",
6228
6397
  success: "Inicio de sesión exitoso"
6229
6398
  };
6230
6399
  var verifyLinkToken_es = {
6231
- labels: labels$b,
6232
- messages: messages$c
6400
+ labels: labels$d,
6401
+ messages: messages$d
6233
6402
  };
6234
6403
 
6235
6404
  var title$7 = "Crear una cuenta";
6236
6405
  var subtitle$2 = "Ingresa tu correo y contraseña a continuación";
6237
- var labels$a = {
6406
+ var labels$c = {
6238
6407
  signUpFacebook: "Regístrate con Facebook",
6239
6408
  signUpGoogle: "Regístrate con Google",
6240
6409
  signUpEmail: "Regístrate con Correo",
@@ -6247,7 +6416,7 @@ var labels$a = {
6247
6416
  lastName: "Apellido",
6248
6417
  phone: "Teléfono"
6249
6418
  };
6250
- var messages$b = {
6419
+ var messages$c = {
6251
6420
  alreadyHaveAccount: " ¿Ya tienes una cuenta?",
6252
6421
  createAccount: "Crear cuenta",
6253
6422
  loginHere: "inicia sesión aquí",
@@ -6321,14 +6490,14 @@ var redeem = {
6321
6490
  var register_es = {
6322
6491
  title: title$7,
6323
6492
  subtitle: subtitle$2,
6324
- labels: labels$a,
6325
- messages: messages$b,
6493
+ labels: labels$c,
6494
+ messages: messages$c,
6326
6495
  errors: errors$1,
6327
6496
  gift: gift,
6328
6497
  redeem: redeem
6329
6498
  };
6330
6499
 
6331
- var labels$9 = {
6500
+ var labels$b = {
6332
6501
  title: "¿Quieres actualizar tu perfil?",
6333
6502
  subtitle: "Ingresa tu información a continuación para actualizar tu perfil",
6334
6503
  email: "Correo",
@@ -6347,21 +6516,21 @@ var labels$9 = {
6347
6516
  zoom: "Acercar",
6348
6517
  tin: "Número de Identificación Fiscal"
6349
6518
  };
6350
- var messages$a = {
6519
+ var messages$b = {
6351
6520
  userUpdated: "¡Gracias! Tu perfil se actualizó con éxito.",
6352
6521
  pictureRemoved: "Tu foto de perfil se eliminó con éxito.",
6353
6522
  pictureUpdated: "Tu foto de perfil se actualizó con éxito."
6354
6523
  };
6355
6524
  var userEdit_es = {
6356
- labels: labels$9,
6357
- messages: messages$a
6525
+ labels: labels$b,
6526
+ messages: messages$b
6358
6527
  };
6359
6528
 
6360
6529
  var title$6 = "Ingresa tu dirección de envío";
6361
6530
  var titleGifting = "Introduce tu dirección";
6362
6531
  var selectAddressTitle = "Por favor, selecciona una dirección";
6363
6532
  var selectAddressSubtitle = "Selecciona una de tus direcciones guardadas o añade una nueva";
6364
- var labels$8 = {
6533
+ var labels$a = {
6365
6534
  address: "Dirección",
6366
6535
  code: "Código Postal/Área",
6367
6536
  city: "Ciudad",
@@ -6372,12 +6541,12 @@ var labels$8 = {
6372
6541
  required: "obligatorio",
6373
6542
  isDefault: "Configurar como dirección Principal"
6374
6543
  };
6375
- var buttons$3 = {
6544
+ var buttons$4 = {
6376
6545
  submit: "Enviar",
6377
6546
  selectAddress: "Seleccionar dirección",
6378
6547
  addAddress: "Añadir nueva dirección"
6379
6548
  };
6380
- var messages$9 = {
6549
+ var messages$a = {
6381
6550
  addressUpdated: "¡La dirección se actualizó con éxito!",
6382
6551
  subRedeemed: "Tu suscripción ha sido redimida."
6383
6552
  };
@@ -6386,9 +6555,9 @@ var address_es = {
6386
6555
  titleGifting: titleGifting,
6387
6556
  selectAddressTitle: selectAddressTitle,
6388
6557
  selectAddressSubtitle: selectAddressSubtitle,
6389
- labels: labels$8,
6390
- buttons: buttons$3,
6391
- messages: messages$9
6558
+ labels: labels$a,
6559
+ buttons: buttons$4,
6560
+ messages: messages$a
6392
6561
  };
6393
6562
 
6394
6563
  var title$5 = "Restablecer tu contraseña";
@@ -6416,7 +6585,7 @@ var password = "Contraseña";
6416
6585
  var submit$2 = "Enviar";
6417
6586
  var required$2 = "Obligatorio";
6418
6587
  var passwordResetEmailSent = "Las instrucciones de restablecimiento de la contraseña se han enviado a tu correo";
6419
- var messages$8 = {
6588
+ var messages$9 = {
6420
6589
  alreadyHaveAccount: "¿Ya tienes una cuenta?",
6421
6590
  loginHere: "Inicia sesión aquí."
6422
6591
  };
@@ -6427,7 +6596,7 @@ var passwordForgot_es = {
6427
6596
  submit: submit$2,
6428
6597
  required: required$2,
6429
6598
  passwordResetEmailSent: passwordResetEmailSent,
6430
- messages: messages$8
6599
+ messages: messages$9
6431
6600
  };
6432
6601
 
6433
6602
  var title$3 = "Cambiar tu contraseña";
@@ -6455,7 +6624,7 @@ var title$2 = "Acceso sin contraseña";
6455
6624
  var email = "Ingresar correo";
6456
6625
  var submit = "Enviar";
6457
6626
  var required = "obligatorio";
6458
- var messages$7 = {
6627
+ var messages$8 = {
6459
6628
  PasswordlessLoginSuccess: "Por favor, revisa tu correo y sigue las instrucciones que se indican"
6460
6629
  };
6461
6630
  var passwordlessRequest_es = {
@@ -6463,7 +6632,7 @@ var passwordlessRequest_es = {
6463
6632
  email: email,
6464
6633
  submit: submit,
6465
6634
  required: required,
6466
- messages: messages$7
6635
+ messages: messages$8
6467
6636
  };
6468
6637
 
6469
6638
  var title$1 = "Tu carrito de compras";
@@ -6491,13 +6660,13 @@ var cart_es = {
6491
6660
  removeAll: removeAll
6492
6661
  };
6493
6662
 
6494
- var buttons$2 = {
6663
+ var buttons$3 = {
6495
6664
  select: "Seleccionar",
6496
6665
  added: "Añadido al carrito",
6497
6666
  purchase: "Compra",
6498
6667
  "continue": "Continuar"
6499
6668
  };
6500
- var messages$6 = {
6669
+ var messages$7 = {
6501
6670
  orderConfirmed: {
6502
6671
  title: "¡Orden confirmada!",
6503
6672
  body: "Tu orden ha sido confirmada y será enviada en los próximos días. En breve recibirás un correo electrónico de confirmación de esta orden."
@@ -6506,17 +6675,17 @@ var messages$6 = {
6506
6675
  multipleCurrencies: "Tu carrito actualmente contiene artículos que están disponibles en diferentes divisas. Para proceder a la compra, asegúrate de que todos los artículos tengan la misma divisa.",
6507
6676
  currencyMismatch: "El siguiente artículo(s) no coincide con tu divisa predeterminada actual ({{currency}}). Por favor, solo elige artículos que coincidan con esta divisa."
6508
6677
  };
6509
- var labels$7 = {
6678
+ var labels$9 = {
6510
6679
  summary: "Resumen de la orden",
6511
6680
  total: "total"
6512
6681
  };
6513
6682
  var shop_es = {
6514
- buttons: buttons$2,
6515
- messages: messages$6,
6516
- labels: labels$7
6683
+ buttons: buttons$3,
6684
+ messages: messages$7,
6685
+ labels: labels$9
6517
6686
  };
6518
6687
 
6519
- var labels$6 = {
6688
+ var labels$8 = {
6520
6689
  cardNumber: "Número de Tarjeta",
6521
6690
  securityCode: "Código de Seguridad",
6522
6691
  submit: "Enviar",
@@ -6538,7 +6707,7 @@ var labels$6 = {
6538
6707
  title: "Información de Pago"
6539
6708
  }
6540
6709
  };
6541
- var messages$5 = {
6710
+ var messages$6 = {
6542
6711
  youAreSafe: "Estás seguro - PCI compliance 128 SSL por",
6543
6712
  cancel: "Cancela tu suscripción en línea en cualquier momento.",
6544
6713
  giftSent: "La suscripción de regalo se ha enviado a",
@@ -6552,12 +6721,12 @@ var errors = {
6552
6721
  "": ""
6553
6722
  };
6554
6723
  var payment_es = {
6555
- labels: labels$6,
6556
- messages: messages$5,
6724
+ labels: labels$8,
6725
+ messages: messages$6,
6557
6726
  errors: errors
6558
6727
  };
6559
6728
 
6560
- var labels$5 = {
6729
+ var labels$7 = {
6561
6730
  menu: "Menú de Pelcro",
6562
6731
  name: "Nombre",
6563
6732
  email: "Correo",
@@ -6572,6 +6741,7 @@ var labels$5 = {
6572
6741
  scheduled: "Programada",
6573
6742
  incomplete: "Incompleta"
6574
6743
  },
6744
+ manageMembers: "Administrar miembros",
6575
6745
  shipments: "Envíos restantes",
6576
6746
  logout: "Cerrar sesión",
6577
6747
  dashboard: "Panel",
@@ -6642,9 +6812,12 @@ var labels$5 = {
6642
6812
  },
6643
6813
  subCancellation: {
6644
6814
  goBack: "Volver"
6815
+ },
6816
+ donationCancellation: {
6817
+ goBack: "Go back"
6645
6818
  }
6646
6819
  };
6647
- var messages$4 = {
6820
+ var messages$5 = {
6648
6821
  noCard: "No tienes una tarjeta",
6649
6822
  subCancellation: {
6650
6823
  isSureToCancel: "¿Estás seguro de que quieres cancelar tu suscripción?",
@@ -6661,11 +6834,60 @@ var messages$4 = {
6661
6834
  loading: "Reanudando tu suscripción",
6662
6835
  success: "La suscripción se reanudó con éxito",
6663
6836
  error: "Error al reanudar tu suscripción"
6837
+ },
6838
+ donationCancellation: {
6839
+ isSureToCancel: "¿Estás seguro de que quieres cancelar tu donación?",
6840
+ loading: "Cancelando tu donación",
6841
+ success: "La donación se canceló con éxito",
6842
+ error: "Error al cancelar tu donación"
6843
+ },
6844
+ donationReactivation: {
6845
+ success: "La donación se reactivó con éxito",
6846
+ error: "Error al reactivar su donación"
6847
+ },
6848
+ donationUnSuspend: {
6849
+ isSureToUnSuspend: "¿Estás seguro de que quieres reanudar tu donación?",
6850
+ loading: "Reanudando tu donación",
6851
+ success: "La donación se reanudó con éxito",
6852
+ error: "Error al reanudar tu donación"
6664
6853
  }
6665
6854
  };
6666
6855
  var dashboard_es = {
6667
- labels: labels$5,
6668
- messages: messages$4
6856
+ labels: labels$7,
6857
+ messages: messages$5
6858
+ };
6859
+
6860
+ var messages$4 = {
6861
+ alreadyHaveAccount: "¿Ya tienes una cuenta?",
6862
+ loginHere: "Inicia sesión aquí",
6863
+ checkbox: "Marca esta casilla para regalar esta suscripción"
6864
+ };
6865
+ var labels$6 = {
6866
+ plan: {
6867
+ title: "Suscribirse a un plan",
6868
+ subtitle: "Selecciona uno de los planes a continuación y pulsa en siguiente."
6869
+ },
6870
+ product: {
6871
+ title: "Suscribirse a un producto",
6872
+ subtitle: "Selecciona uno de los productos a continuación y pulsa en siguiente."
6873
+ },
6874
+ selectProduct: "Selecciona un producto",
6875
+ selectPlan: "Selecciona un plan",
6876
+ startingAt: "Inicia el",
6877
+ restrictiveArticles: {
6878
+ subscribeTo: "Suscríbete a una de las siguientes opciones para obtener acceso a esta página",
6879
+ or: "O revisa algunas de nuestras otras opciones a continuación"
6880
+ }
6881
+ };
6882
+ var buttons$2 = {
6883
+ next: "Siguiente",
6884
+ select: "Seleccionar",
6885
+ back: "Volver"
6886
+ };
6887
+ var select_es = {
6888
+ messages: messages$4,
6889
+ labels: labels$6,
6890
+ buttons: buttons$2
6669
6891
  };
6670
6892
 
6671
6893
  var messages$3 = {
@@ -6673,7 +6895,7 @@ var messages$3 = {
6673
6895
  loginHere: "Inicia sesión aquí",
6674
6896
  checkbox: "Marca esta casilla para regalar esta suscripción"
6675
6897
  };
6676
- var labels$4 = {
6898
+ var labels$5 = {
6677
6899
  plan: {
6678
6900
  title: "Suscribirse a un plan",
6679
6901
  subtitle: "Selecciona uno de los planes a continuación y pulsa en siguiente."
@@ -6695,9 +6917,9 @@ var buttons$1 = {
6695
6917
  select: "Seleccionar",
6696
6918
  back: "Volver"
6697
6919
  };
6698
- var select_es = {
6920
+ var donation_es = {
6699
6921
  messages: messages$3,
6700
- labels: labels$4,
6922
+ labels: labels$5,
6701
6923
  buttons: buttons$1
6702
6924
  };
6703
6925
 
@@ -6711,7 +6933,7 @@ var notification_es = {
6711
6933
  confirm: confirm
6712
6934
  };
6713
6935
 
6714
- var labels$3 = {
6936
+ var labels$4 = {
6715
6937
  title: "Verifica tu correo",
6716
6938
  instructions: "¡Ya casi terminas!\nVamos a confirmar tu dirección de correo.\nPulsa el enlace de verificación que hemos enviado a tu correo:",
6717
6939
  resend: "Reenviar correo"
@@ -6721,12 +6943,12 @@ var messages$2 = {
6721
6943
  success: "¡El correo se verificó con éxito!"
6722
6944
  };
6723
6945
  var verifyEmail_es = {
6724
- labels: labels$3,
6946
+ labels: labels$4,
6725
6947
  messages: messages$2
6726
6948
  };
6727
6949
 
6728
6950
  var title = "Detalles del comprobante de pago";
6729
- var labels$2 = {
6951
+ var labels$3 = {
6730
6952
  summary: "Resumen",
6731
6953
  total: "Total",
6732
6954
  amountPaid: "Monto pagado",
@@ -6739,11 +6961,11 @@ var buttons = {
6739
6961
  };
6740
6962
  var invoiceDetails_es = {
6741
6963
  title: title,
6742
- labels: labels$2,
6964
+ labels: labels$3,
6743
6965
  buttons: buttons
6744
6966
  };
6745
6967
 
6746
- var labels$1 = {
6968
+ var labels$2 = {
6747
6969
  title: "Cancelar suscripción",
6748
6970
  cancelReason: "Razón de la cancelación",
6749
6971
  subCancellation: {
@@ -6763,10 +6985,25 @@ var messages$1 = {
6763
6985
  }
6764
6986
  };
6765
6987
  var subscriptionCancel_es = {
6766
- labels: labels$1,
6988
+ labels: labels$2,
6767
6989
  messages: messages$1
6768
6990
  };
6769
6991
 
6992
+ var labels$1 = {
6993
+ inviteMembers: "Invitar miembros",
6994
+ listOfMembers: "Lista de miembros",
6995
+ invite: "Invitar",
6996
+ remove: "quitar",
6997
+ emails: "Ingresar correo electrónico",
6998
+ status: "Estado",
6999
+ actions: "Acciones",
7000
+ email: "Correo electrónico",
7001
+ listNote: "Lista separada por comas, por ejemplo"
7002
+ };
7003
+ var subscriptionManageMembers_es = {
7004
+ labels: labels$1
7005
+ };
7006
+
6770
7007
  var labels = {
6771
7008
  title: "Suspender suscripción",
6772
7009
  suspensionDate: "Fecha de suspensión",
@@ -9076,6 +9313,9 @@ const initialState$n = {
9076
9313
  giftCode: "",
9077
9314
  subscriptionIdToRenew: null,
9078
9315
  subscriptionToManageMembers: null,
9316
+ isDonation: false,
9317
+ selectedDonationAmount: null,
9318
+ customDonationAmount: null,
9079
9319
  // E-commerce
9080
9320
  cartItems: [],
9081
9321
  order: null,
@@ -9149,16 +9389,19 @@ const ZERO_DECIMAL_CURRENCIES = ["BIF", "CLP", "DJF", "GNF", "JPY", "KMF", "KRW"
9149
9389
  const isCurrencyZeroDecimal = currency => ZERO_DECIMAL_CURRENCIES.includes(currency.toUpperCase());
9150
9390
  const sortCountries = countries => {
9151
9391
  const sortable = [];
9152
- delete countries.CA;
9153
- delete countries.US;
9154
- for (const abbr in countries) {
9155
- sortable.push([abbr, countries[abbr]]);
9392
+ const {
9393
+ CA,
9394
+ US,
9395
+ ...rest
9396
+ } = countries;
9397
+ for (const abbr in rest) {
9398
+ sortable.push([abbr, rest[abbr]]);
9156
9399
  }
9157
9400
  sortable.sort((a, b) => {
9158
9401
  if (a[1] > b[1]) return 1;
9159
9402
  return -1;
9160
9403
  });
9161
- sortable.unshift(["US", "United States"], ["CA", "Canada"]);
9404
+ sortable.unshift(["US", US], ["CA", CA]);
9162
9405
  return sortable;
9163
9406
  };
9164
9407
 
@@ -9262,7 +9505,7 @@ const calcAndFormatItemsTotal = (items, currency) => {
9262
9505
  * @return {boolean}
9263
9506
  */
9264
9507
  const isValidViewFromURL = viewID => {
9265
- if (["login", "register", "plan-select", "gift-redeem", "password-forgot", "password-reset", "password-change", "passwordless-request", "passwordless-login", "payment-method-update", "user-edit", "newsletter", "address-create", "order-create", "cart", "email-verify", "invoice-details", "manage-members"].includes(viewID) || hasValidNewsletterUpdateUrl()) {
9508
+ if (["login", "register", "plan-select", "donation-select", "gift-redeem", "password-forgot", "password-reset", "password-change", "passwordless-request", "passwordless-login", "payment-method-update", "user-edit", "newsletter", "address-create", "order-create", "cart", "email-verify", "invoice-details", "manage-members"].includes(viewID) || hasValidNewsletterUpdateUrl()) {
9266
9509
  return true;
9267
9510
  }
9268
9511
  return false;
@@ -9469,6 +9712,17 @@ function notifyBugsnag(callback, startOptions) {
9469
9712
  callback();
9470
9713
  }
9471
9714
 
9715
+ //create a safe and strong password string with special characters
9716
+ function generatePassword() {
9717
+ const length = 16;
9718
+ const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+{}|:<>?`~";
9719
+ let retVal = "";
9720
+ for (let i = 0, n = charset.length; i < length; ++i) {
9721
+ retVal += charset.charAt(Math.floor(Math.random() * n));
9722
+ }
9723
+ return retVal;
9724
+ }
9725
+
9472
9726
  const resources = {
9473
9727
  en: {
9474
9728
  common: common_en,
@@ -9493,6 +9747,7 @@ const resources = {
9493
9747
  payment: payment_en,
9494
9748
  dashboard: dashboard_en,
9495
9749
  select: select_en,
9750
+ donation: donation_en,
9496
9751
  notification: notification_en,
9497
9752
  invoiceDetails: invoiceDetails_en,
9498
9753
  subscriptionCancel: subscriptionCancel_en,
@@ -9522,6 +9777,7 @@ const resources = {
9522
9777
  payment: payment_fr,
9523
9778
  dashboard: dashboard_fr,
9524
9779
  select: select_fr,
9780
+ donation: donation_fr,
9525
9781
  notification: notification_fr,
9526
9782
  invoiceDetails: invoiceDetails_fr,
9527
9783
  subscriptionCancel: subscriptionCancel_fr,
@@ -9551,6 +9807,7 @@ const resources = {
9551
9807
  payment: payment_ko,
9552
9808
  dashboard: dashboard_ko,
9553
9809
  select: select_ko,
9810
+ donation: donation_ko,
9554
9811
  notification: notification_ko,
9555
9812
  invoiceDetails: invoiceDetails_ko,
9556
9813
  subscriptionCancel: subscriptionCancel_ko,
@@ -9580,10 +9837,12 @@ const resources = {
9580
9837
  payment: payment_es,
9581
9838
  dashboard: dashboard_es,
9582
9839
  select: select_es,
9840
+ donation: donation_es,
9583
9841
  notification: notification_es,
9584
9842
  invoiceDetails: invoiceDetails_es,
9585
9843
  subscriptionCancel: subscriptionCancel_es,
9586
- subscriptionSuspend: subscriptionSuspend_es
9844
+ subscriptionSuspend: subscriptionSuspend_es,
9845
+ subscriptionManageMembers: subscriptionManageMembers_es
9587
9846
  }
9588
9847
  };
9589
9848
 
@@ -9615,16 +9874,185 @@ pageLanguageObserver.observe(document.documentElement, {
9615
9874
  attributes: true
9616
9875
  });
9617
9876
 
9618
- function _classPrivateFieldGet(receiver, privateMap) {
9619
- var descriptor = privateMap.get(receiver);
9620
-
9621
- if (!descriptor) {
9622
- throw new TypeError("attempted to get private field on non-instance");
9623
- }
9877
+ var pure$1 = createCommonjsModule(function (module, exports) {
9624
9878
 
9625
- if (descriptor.get) {
9626
- return descriptor.get.call(receiver);
9627
- }
9879
+ Object.defineProperty(exports, '__esModule', { value: true });
9880
+
9881
+ function _typeof(obj) {
9882
+ "@babel/helpers - typeof";
9883
+
9884
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
9885
+ _typeof = function (obj) {
9886
+ return typeof obj;
9887
+ };
9888
+ } else {
9889
+ _typeof = function (obj) {
9890
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
9891
+ };
9892
+ }
9893
+
9894
+ return _typeof(obj);
9895
+ }
9896
+
9897
+ var V3_URL = 'https://js.stripe.com/v3';
9898
+ var V3_URL_REGEX = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;
9899
+ var EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';
9900
+ var findScript = function findScript() {
9901
+ var scripts = document.querySelectorAll("script[src^=\"".concat(V3_URL, "\"]"));
9902
+
9903
+ for (var i = 0; i < scripts.length; i++) {
9904
+ var script = scripts[i];
9905
+
9906
+ if (!V3_URL_REGEX.test(script.src)) {
9907
+ continue;
9908
+ }
9909
+
9910
+ return script;
9911
+ }
9912
+
9913
+ return null;
9914
+ };
9915
+
9916
+ var injectScript = function injectScript(params) {
9917
+ var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';
9918
+ var script = document.createElement('script');
9919
+ script.src = "".concat(V3_URL).concat(queryString);
9920
+ var headOrBody = document.head || document.body;
9921
+
9922
+ if (!headOrBody) {
9923
+ throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');
9924
+ }
9925
+
9926
+ headOrBody.appendChild(script);
9927
+ return script;
9928
+ };
9929
+
9930
+ var registerWrapper = function registerWrapper(stripe, startTime) {
9931
+ if (!stripe || !stripe._registerWrapper) {
9932
+ return;
9933
+ }
9934
+
9935
+ stripe._registerWrapper({
9936
+ name: 'stripe-js',
9937
+ version: "1.21.1",
9938
+ startTime: startTime
9939
+ });
9940
+ };
9941
+
9942
+ var stripePromise = null;
9943
+ var loadScript = function loadScript(params) {
9944
+ // Ensure that we only attempt to load Stripe.js at most once
9945
+ if (stripePromise !== null) {
9946
+ return stripePromise;
9947
+ }
9948
+
9949
+ stripePromise = new Promise(function (resolve, reject) {
9950
+ if (typeof window === 'undefined') {
9951
+ // Resolve to null when imported server side. This makes the module
9952
+ // safe to import in an isomorphic code base.
9953
+ resolve(null);
9954
+ return;
9955
+ }
9956
+
9957
+ if (window.Stripe && params) {
9958
+ console.warn(EXISTING_SCRIPT_MESSAGE);
9959
+ }
9960
+
9961
+ if (window.Stripe) {
9962
+ resolve(window.Stripe);
9963
+ return;
9964
+ }
9965
+
9966
+ try {
9967
+ var script = findScript();
9968
+
9969
+ if (script && params) {
9970
+ console.warn(EXISTING_SCRIPT_MESSAGE);
9971
+ } else if (!script) {
9972
+ script = injectScript(params);
9973
+ }
9974
+
9975
+ script.addEventListener('load', function () {
9976
+ if (window.Stripe) {
9977
+ resolve(window.Stripe);
9978
+ } else {
9979
+ reject(new Error('Stripe.js not available'));
9980
+ }
9981
+ });
9982
+ script.addEventListener('error', function () {
9983
+ reject(new Error('Failed to load Stripe.js'));
9984
+ });
9985
+ } catch (error) {
9986
+ reject(error);
9987
+ return;
9988
+ }
9989
+ });
9990
+ return stripePromise;
9991
+ };
9992
+ var initStripe = function initStripe(maybeStripe, args, startTime) {
9993
+ if (maybeStripe === null) {
9994
+ return null;
9995
+ }
9996
+
9997
+ var stripe = maybeStripe.apply(undefined, args);
9998
+ registerWrapper(stripe, startTime);
9999
+ return stripe;
10000
+ };
10001
+ var validateLoadParams = function validateLoadParams(params) {
10002
+ var errorMessage = "invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ".concat(JSON.stringify(params), "\n");
10003
+
10004
+ if (params === null || _typeof(params) !== 'object') {
10005
+ throw new Error(errorMessage);
10006
+ }
10007
+
10008
+ if (Object.keys(params).length === 1 && typeof params.advancedFraudSignals === 'boolean') {
10009
+ return params;
10010
+ }
10011
+
10012
+ throw new Error(errorMessage);
10013
+ };
10014
+
10015
+ var loadParams;
10016
+ var loadStripeCalled = false;
10017
+ var loadStripe = function loadStripe() {
10018
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
10019
+ args[_key] = arguments[_key];
10020
+ }
10021
+
10022
+ loadStripeCalled = true;
10023
+ var startTime = Date.now();
10024
+ return loadScript(loadParams).then(function (maybeStripe) {
10025
+ return initStripe(maybeStripe, args, startTime);
10026
+ });
10027
+ };
10028
+
10029
+ loadStripe.setLoadParameters = function (params) {
10030
+ if (loadStripeCalled) {
10031
+ throw new Error('You cannot change load parameters after calling loadStripe');
10032
+ }
10033
+
10034
+ loadParams = validateLoadParams(params);
10035
+ };
10036
+
10037
+ exports.loadStripe = loadStripe;
10038
+ });
10039
+
10040
+ unwrapExports(pure$1);
10041
+ pure$1.loadStripe;
10042
+
10043
+ var pure = pure$1;
10044
+ var pure_1 = pure.loadStripe;
10045
+
10046
+ function _classPrivateFieldGet(receiver, privateMap) {
10047
+ var descriptor = privateMap.get(receiver);
10048
+
10049
+ if (!descriptor) {
10050
+ throw new TypeError("attempted to get private field on non-instance");
10051
+ }
10052
+
10053
+ if (descriptor.get) {
10054
+ return descriptor.get.call(receiver);
10055
+ }
9628
10056
 
9629
10057
  return descriptor.value;
9630
10058
  }
@@ -10792,7 +11220,7 @@ toast.confirm = function (onConfirm, _ref3) {
10792
11220
  ...options
10793
11221
  });
10794
11222
  setTimeout(() => {
10795
- notify$1.dismiss(id);
11223
+ notify.dismiss(id);
10796
11224
  }, 3000);
10797
11225
  };
10798
11226
  const onFailure = errorValue => {
@@ -10801,11 +11229,11 @@ toast.confirm = function (onConfirm, _ref3) {
10801
11229
  ...options
10802
11230
  });
10803
11231
  setTimeout(() => {
10804
- notify$1.dismiss(id);
11232
+ notify.dismiss(id);
10805
11233
  }, 3000);
10806
11234
  };
10807
11235
  };
10808
- const notify$1 = toast;
11236
+ const notify = toast;
10809
11237
 
10810
11238
  const translations = i18next.t("common:buttons", {
10811
11239
  returnObjects: true
@@ -10866,7 +11294,7 @@ const init$1 = () => {
10866
11294
  const errorMessage = i18next.t("messages:invalidSubscription", {
10867
11295
  returnObjects: true
10868
11296
  });
10869
- return notify$1.error(errorMessage);
11297
+ return notify.error(errorMessage);
10870
11298
  }
10871
11299
  switchView("manage-members");
10872
11300
  });
@@ -10874,7 +11302,7 @@ const init$1 = () => {
10874
11302
  const errorMessage = i18next.t("messages:invalidSubscription", {
10875
11303
  returnObjects: true
10876
11304
  });
10877
- return notify$1.error(errorMessage);
11305
+ return notify.error(errorMessage);
10878
11306
  }
10879
11307
  }
10880
11308
  }
@@ -10932,6 +11360,57 @@ const init$1 = () => {
10932
11360
  }
10933
11361
  }
10934
11362
  }
11363
+ const pelcroDonateButtonsByClass = document.getElementsByClassName("pelcro-donate-button");
11364
+ if (pelcroDonateButtonsByClass.length !== 0) {
11365
+ for (let j = 0; j < pelcroDonateButtonsByClass.length; j++) {
11366
+ if (pelcroDonateButtonsByClass[j].dataset && "productId" in pelcroDonateButtonsByClass[j].dataset) {
11367
+ pelcroDonateButtonsByClass[j].addEventListener("click", e => {
11368
+ var _selectedProduct$plan2;
11369
+ set({
11370
+ isDonation: true
11371
+ });
11372
+ const productsList = window.Pelcro.product.list();
11373
+ if (!(productsList !== null && productsList !== void 0 && productsList.length)) return;
11374
+ const [productId, planId, isGift] = [e.target.dataset.productId, e.target.dataset.planId, e.target.dataset.isGift];
11375
+ const selectedProduct = productsList.find(product => product.id === Number(productId));
11376
+ const selectedPlan = selectedProduct === null || selectedProduct === void 0 ? void 0 : (_selectedProduct$plan2 = selectedProduct.plans) === null || _selectedProduct$plan2 === void 0 ? void 0 : _selectedProduct$plan2.find(plan => plan.id === Number(planId));
11377
+ set({
11378
+ product: selectedProduct,
11379
+ plan: selectedPlan,
11380
+ isGift: Boolean(isGift)
11381
+ });
11382
+ if (!selectedProduct || !selectedPlan) {
11383
+ return switchView("plan-select");
11384
+ }
11385
+
11386
+ // if (!isAuthenticated()) {
11387
+ // return switchView("register");
11388
+ // }
11389
+
11390
+ if (isGift) {
11391
+ return switchView("gift-create");
11392
+ }
11393
+
11394
+ // const requiresAddress = Boolean(
11395
+ // selectedProduct.address_required
11396
+ // );
11397
+
11398
+ // if (requiresAddress) {
11399
+ // return switchToAddressView();
11400
+ // }
11401
+
11402
+ return switchToPaymentView();
11403
+ });
11404
+ } else {
11405
+ pelcroDonateButtonsByClass[j].addEventListener("click", () => {
11406
+ set({
11407
+ isDonation: true
11408
+ });
11409
+ switchView("donation-select");
11410
+ });
11411
+ }
11412
+ }
11413
+ }
10935
11414
  const pelcroOfflineSubButtonsByClass = document.getElementsByClassName("pelcro-offline-subscribe-button");
10936
11415
  if (pelcroOfflineSubButtonsByClass.length !== 0) {
10937
11416
  for (let j = 0; j < pelcroOfflineSubButtonsByClass.length; j++) {
@@ -11011,7 +11490,7 @@ const init$1 = () => {
11011
11490
  const errorMsg = i18next.t("shop:messages.currencyMismatch", {
11012
11491
  currency: userCurrency
11013
11492
  });
11014
- notify$1.error(errorMsg);
11493
+ notify.error(errorMsg);
11015
11494
  }
11016
11495
  });
11017
11496
  }
@@ -11104,7 +11583,7 @@ const init = () => {
11104
11583
  unblurElemWhenUserLogsIn(elemDeepClone, entitlements);
11105
11584
  unblurElemWhenUserLogsOut(elemDeepClone, entitlements);
11106
11585
  const NOTIFICATION_ID = "entitlement";
11107
- notify$1( /*#__PURE__*/React__default['default'].createElement("p", null, /*#__PURE__*/React__default['default'].createElement(Trans, {
11586
+ notify( /*#__PURE__*/React__default['default'].createElement("p", null, /*#__PURE__*/React__default['default'].createElement(Trans, {
11108
11587
  i18nKey: "messages:entitlement"
11109
11588
  }, "Some of the content on this page is available with one or more of our plans.", /*#__PURE__*/React__default['default'].createElement(Link, {
11110
11589
  onClick: () => {
@@ -11119,7 +11598,7 @@ const init = () => {
11119
11598
  plan: selectedPlan
11120
11599
  });
11121
11600
  }
11122
- notify$1.dismiss(NOTIFICATION_ID);
11601
+ notify.dismiss(NOTIFICATION_ID);
11123
11602
  switchView("_plan-select-entitlements");
11124
11603
  }
11125
11604
  }, "Subscribe"), "now to get full page access.")), {
@@ -11184,210 +11663,41 @@ function shouldBlurContent(entitlements) {
11184
11663
  return entitlements.every(entitlement => !window.Pelcro.user.isEntitledTo(entitlement));
11185
11664
  }
11186
11665
 
11187
- var pure$1 = createCommonjsModule(function (module, exports) {
11188
-
11189
- Object.defineProperty(exports, '__esModule', { value: true });
11666
+ /**
11667
+ * Extracts error message from the response error object
11668
+ * @param {Object} error Error object
11669
+ * @return {string}
11670
+ */
11671
+ const getErrorMessages = error => {
11672
+ var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
11673
+ if (error !== null && error !== void 0 && (_error$error = error.error) !== null && _error$error !== void 0 && _error$error.message) {
11674
+ return error.error.message;
11675
+ }
11676
+ if (error !== null && error !== void 0 && (_error$response = error.response) !== null && _error$response !== void 0 && (_error$response$data = _error$response.data) !== null && _error$response$data !== void 0 && _error$response$data.message) {
11677
+ var _error$response2, _error$response2$data;
11678
+ return error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : _error$response2$data.message;
11679
+ }
11680
+ if (error !== null && error !== void 0 && (_error$response3 = error.response) !== null && _error$response3 !== void 0 && (_error$response3$data = _error$response3.data) !== null && _error$response3$data !== void 0 && (_error$response3$data2 = _error$response3$data.error) !== null && _error$response3$data2 !== void 0 && _error$response3$data2.message) {
11681
+ var _error$response4, _error$response4$data, _error$response4$data2;
11682
+ return error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.error) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2.message;
11683
+ }
11684
+ if (error !== null && error !== void 0 && (_error$response5 = error.response) !== null && _error$response5 !== void 0 && (_error$response5$data = _error$response5.data) !== null && _error$response5$data !== void 0 && _error$response5$data.errors) {
11685
+ var _error$response6, _error$response6$data;
11686
+ const errorMessages = [];
11190
11687
 
11191
- function _typeof(obj) {
11192
- "@babel/helpers - typeof";
11688
+ // enumerable error (ex: validation errors)
11689
+ Object.values(error === null || error === void 0 ? void 0 : (_error$response6 = error.response) === null || _error$response6 === void 0 ? void 0 : (_error$response6$data = _error$response6.data) === null || _error$response6$data === void 0 ? void 0 : _error$response6$data.errors).forEach(_ref => {
11690
+ let [errorMessage] = _ref;
11691
+ errorMessages.push(errorMessage);
11692
+ });
11193
11693
 
11194
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
11195
- _typeof = function (obj) {
11196
- return typeof obj;
11197
- };
11198
- } else {
11199
- _typeof = function (obj) {
11200
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
11201
- };
11694
+ // convert to multiline string
11695
+ return errorMessages.join("\n");
11202
11696
  }
11203
-
11204
- return _typeof(obj);
11205
- }
11206
-
11207
- var V3_URL = 'https://js.stripe.com/v3';
11208
- var V3_URL_REGEX = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;
11209
- var EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';
11210
- var findScript = function findScript() {
11211
- var scripts = document.querySelectorAll("script[src^=\"".concat(V3_URL, "\"]"));
11212
-
11213
- for (var i = 0; i < scripts.length; i++) {
11214
- var script = scripts[i];
11215
-
11216
- if (!V3_URL_REGEX.test(script.src)) {
11217
- continue;
11218
- }
11219
-
11220
- return script;
11221
- }
11222
-
11223
- return null;
11224
- };
11225
-
11226
- var injectScript = function injectScript(params) {
11227
- var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';
11228
- var script = document.createElement('script');
11229
- script.src = "".concat(V3_URL).concat(queryString);
11230
- var headOrBody = document.head || document.body;
11231
-
11232
- if (!headOrBody) {
11233
- throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');
11234
- }
11235
-
11236
- headOrBody.appendChild(script);
11237
- return script;
11238
- };
11239
-
11240
- var registerWrapper = function registerWrapper(stripe, startTime) {
11241
- if (!stripe || !stripe._registerWrapper) {
11242
- return;
11243
- }
11244
-
11245
- stripe._registerWrapper({
11246
- name: 'stripe-js',
11247
- version: "1.21.1",
11248
- startTime: startTime
11249
- });
11250
- };
11251
-
11252
- var stripePromise = null;
11253
- var loadScript = function loadScript(params) {
11254
- // Ensure that we only attempt to load Stripe.js at most once
11255
- if (stripePromise !== null) {
11256
- return stripePromise;
11257
- }
11258
-
11259
- stripePromise = new Promise(function (resolve, reject) {
11260
- if (typeof window === 'undefined') {
11261
- // Resolve to null when imported server side. This makes the module
11262
- // safe to import in an isomorphic code base.
11263
- resolve(null);
11264
- return;
11265
- }
11266
-
11267
- if (window.Stripe && params) {
11268
- console.warn(EXISTING_SCRIPT_MESSAGE);
11269
- }
11270
-
11271
- if (window.Stripe) {
11272
- resolve(window.Stripe);
11273
- return;
11274
- }
11275
-
11276
- try {
11277
- var script = findScript();
11278
-
11279
- if (script && params) {
11280
- console.warn(EXISTING_SCRIPT_MESSAGE);
11281
- } else if (!script) {
11282
- script = injectScript(params);
11283
- }
11284
-
11285
- script.addEventListener('load', function () {
11286
- if (window.Stripe) {
11287
- resolve(window.Stripe);
11288
- } else {
11289
- reject(new Error('Stripe.js not available'));
11290
- }
11291
- });
11292
- script.addEventListener('error', function () {
11293
- reject(new Error('Failed to load Stripe.js'));
11294
- });
11295
- } catch (error) {
11296
- reject(error);
11297
- return;
11298
- }
11299
- });
11300
- return stripePromise;
11301
- };
11302
- var initStripe = function initStripe(maybeStripe, args, startTime) {
11303
- if (maybeStripe === null) {
11304
- return null;
11305
- }
11306
-
11307
- var stripe = maybeStripe.apply(undefined, args);
11308
- registerWrapper(stripe, startTime);
11309
- return stripe;
11310
- };
11311
- var validateLoadParams = function validateLoadParams(params) {
11312
- var errorMessage = "invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ".concat(JSON.stringify(params), "\n");
11313
-
11314
- if (params === null || _typeof(params) !== 'object') {
11315
- throw new Error(errorMessage);
11316
- }
11317
-
11318
- if (Object.keys(params).length === 1 && typeof params.advancedFraudSignals === 'boolean') {
11319
- return params;
11320
- }
11321
-
11322
- throw new Error(errorMessage);
11323
- };
11324
-
11325
- var loadParams;
11326
- var loadStripeCalled = false;
11327
- var loadStripe = function loadStripe() {
11328
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
11329
- args[_key] = arguments[_key];
11330
- }
11331
-
11332
- loadStripeCalled = true;
11333
- var startTime = Date.now();
11334
- return loadScript(loadParams).then(function (maybeStripe) {
11335
- return initStripe(maybeStripe, args, startTime);
11336
- });
11337
- };
11338
-
11339
- loadStripe.setLoadParameters = function (params) {
11340
- if (loadStripeCalled) {
11341
- throw new Error('You cannot change load parameters after calling loadStripe');
11342
- }
11343
-
11344
- loadParams = validateLoadParams(params);
11345
- };
11346
-
11347
- exports.loadStripe = loadStripe;
11348
- });
11349
-
11350
- unwrapExports(pure$1);
11351
- pure$1.loadStripe;
11352
-
11353
- var pure = pure$1;
11354
- var pure_1 = pure.loadStripe;
11355
-
11356
- /**
11357
- * Extracts error message from the response error object
11358
- * @param {Object} error Error object
11359
- * @return {string}
11360
- */
11361
- const getErrorMessages = error => {
11362
- var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
11363
- if (error !== null && error !== void 0 && (_error$error = error.error) !== null && _error$error !== void 0 && _error$error.message) {
11364
- return error.error.message;
11365
- }
11366
- if (error !== null && error !== void 0 && (_error$response = error.response) !== null && _error$response !== void 0 && (_error$response$data = _error$response.data) !== null && _error$response$data !== void 0 && _error$response$data.message) {
11367
- var _error$response2, _error$response2$data;
11368
- return error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : _error$response2$data.message;
11369
- }
11370
- if (error !== null && error !== void 0 && (_error$response3 = error.response) !== null && _error$response3 !== void 0 && (_error$response3$data = _error$response3.data) !== null && _error$response3$data !== void 0 && (_error$response3$data2 = _error$response3$data.error) !== null && _error$response3$data2 !== void 0 && _error$response3$data2.message) {
11371
- var _error$response4, _error$response4$data, _error$response4$data2;
11372
- return error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.error) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2.message;
11373
- }
11374
- if (error !== null && error !== void 0 && (_error$response5 = error.response) !== null && _error$response5 !== void 0 && (_error$response5$data = _error$response5.data) !== null && _error$response5$data !== void 0 && _error$response5$data.errors) {
11375
- var _error$response6, _error$response6$data;
11376
- const errorMessages = [];
11377
-
11378
- // enumerable error (ex: validation errors)
11379
- Object.values(error === null || error === void 0 ? void 0 : (_error$response6 = error.response) === null || _error$response6 === void 0 ? void 0 : (_error$response6$data = _error$response6.data) === null || _error$response6$data === void 0 ? void 0 : _error$response6$data.errors).forEach(_ref => {
11380
- let [errorMessage] = _ref;
11381
- errorMessages.push(errorMessage);
11382
- });
11383
-
11384
- // convert to multiline string
11385
- return errorMessages.join("\n");
11386
- }
11387
- if (error !== null && error !== void 0 && error.message) {
11388
- return error.message;
11389
- }
11390
- };
11697
+ if (error !== null && error !== void 0 && error.message) {
11698
+ return error.message;
11699
+ }
11700
+ };
11391
11701
 
11392
11702
  /**
11393
11703
  * Executes function after a wait time of inactivity
@@ -11506,16 +11816,12 @@ const initPaywalls = () => {
11506
11816
  };
11507
11817
  const loadPaymentSDKs = () => {
11508
11818
  // Lazy load stripe's SDK
11509
- const {
11510
- whenUserReady
11511
- } = usePelcro.getStore();
11819
+ usePelcro.getStore();
11512
11820
  const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_gateway_settings);
11513
11821
  const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
11514
- whenUserReady(() => {
11515
- if (!window.Stripe && !supportsVantiv && !supportsTap) {
11516
- pure_1(window.Pelcro.environment.stripe);
11517
- }
11518
- });
11822
+ if (!window.Stripe && !supportsVantiv && !supportsTap) {
11823
+ pure_1(window.Pelcro.environment.stripe);
11824
+ }
11519
11825
 
11520
11826
  // Load PayPal SDKs
11521
11827
  const supportsPaypal = Boolean(window.Pelcro.site.read().braintree_tokenization);
@@ -11666,6 +11972,9 @@ const initViewFromURL = () => {
11666
11972
  if (view === "plan-select") {
11667
11973
  return initSubscriptionFromURL();
11668
11974
  }
11975
+ if (view === "donation-select") {
11976
+ return initDonationFromURL();
11977
+ }
11669
11978
  if (view === "register") {
11670
11979
  const offlinePlanId = window.Pelcro.helpers.getURLParameter("plan_id");
11671
11980
  if (offlinePlanId) {
@@ -11748,6 +12057,61 @@ const initSubscriptionFromURL = () => {
11748
12057
  });
11749
12058
  };
11750
12059
 
12060
+ /**
12061
+ * Initializes the donation flow if 'product_id' & 'plan_id' params exist
12062
+ * with valid IDs. Otherwise, switches to the donation selection flow
12063
+ */
12064
+ const initDonationFromURL = () => {
12065
+ const {
12066
+ switchView,
12067
+ whenSiteReady,
12068
+ set
12069
+ } = usePelcro.getStore();
12070
+ whenSiteReady(() => {
12071
+ var _selectedProduct$plan2;
12072
+ const productsList = window.Pelcro.product.list();
12073
+ if (!(productsList !== null && productsList !== void 0 && productsList.length)) {
12074
+ return;
12075
+ }
12076
+ const [productId, planId, isGiftParam] = [window.Pelcro.helpers.getURLParameter("product_id"), window.Pelcro.helpers.getURLParameter("plan_id"), window.Pelcro.helpers.getURLParameter("is_gift")];
12077
+ const isGift = (isGiftParam === null || isGiftParam === void 0 ? void 0 : isGiftParam.toLowerCase()) === "true";
12078
+ const selectedProduct = productsList.find(product => product.id === Number(productId));
12079
+ const selectedPlan = selectedProduct === null || selectedProduct === void 0 ? void 0 : (_selectedProduct$plan2 = selectedProduct.plans) === null || _selectedProduct$plan2 === void 0 ? void 0 : _selectedProduct$plan2.find(plan => plan.id === Number(planId));
12080
+ set({
12081
+ product: selectedProduct,
12082
+ plan: selectedPlan,
12083
+ isGift
12084
+ });
12085
+ if (!selectedProduct || !selectedPlan) {
12086
+ set({
12087
+ isDonation: true
12088
+ });
12089
+ return switchView("donation-select");
12090
+ }
12091
+ const {
12092
+ isAuthenticated,
12093
+ switchToAddressView,
12094
+ switchToPaymentView
12095
+ } = usePelcro.getStore();
12096
+
12097
+ // if (!isAuthenticated()) {
12098
+ // return switchView("register");
12099
+ // }
12100
+
12101
+ // if (isGift) {
12102
+ // return switchView("gift-create");
12103
+ // }
12104
+
12105
+ // const requiresAddress = Boolean(selectedProduct.address_required);
12106
+ //
12107
+ // if (requiresAddress) {
12108
+ // return switchToAddressView();
12109
+ // }
12110
+
12111
+ return switchToPaymentView();
12112
+ });
12113
+ };
12114
+
11751
12115
  /**
11752
12116
  * Initializes offline subscription flow if 'plan_id' params exist
11753
12117
  * with valid IDs, Otherwise, ignore the param
@@ -11847,9 +12211,9 @@ const verifyEmailTokenFromUrl = () => {
11847
12211
  token: emailToken
11848
12212
  }, (err, res) => {
11849
12213
  if (err) {
11850
- return notify$1.error(getErrorMessages(err));
12214
+ return notify.error(getErrorMessages(err));
11851
12215
  }
11852
- return notify$1.success(translations.success);
12216
+ return notify.success(translations.success);
11853
12217
  });
11854
12218
  }, {
11855
12219
  once: true
@@ -11873,7 +12237,7 @@ const verifyLinkTokenFromUrl = () => {
11873
12237
  token: loginToken
11874
12238
  }, (err, res) => {
11875
12239
  if (err) {
11876
- return notify$1.error(getErrorMessages(err));
12240
+ return notify.error(getErrorMessages(err));
11877
12241
  }
11878
12242
  const {
11879
12243
  auth_token
@@ -11882,10 +12246,10 @@ const verifyLinkTokenFromUrl = () => {
11882
12246
  auth_token
11883
12247
  }, (err, res) => {
11884
12248
  if (err) {
11885
- return notify$1.error(getErrorMessages(err));
12249
+ return notify.error(getErrorMessages(err));
11886
12250
  }
11887
12251
  resetView();
11888
- return notify$1.success(translations.success);
12252
+ return notify.success(translations.success);
11889
12253
  });
11890
12254
  });
11891
12255
  }, {
@@ -11960,7 +12324,7 @@ const showInvoiceDetailsFromUrl = () => {
11960
12324
  const errorMessage = i18next.t("messages:invalidInvoice", {
11961
12325
  returnObjects: true
11962
12326
  });
11963
- return notify$1.error(errorMessage);
12327
+ return notify.error(errorMessage);
11964
12328
  }
11965
12329
  const {
11966
12330
  invoice
@@ -11969,7 +12333,7 @@ const showInvoiceDetailsFromUrl = () => {
11969
12333
  const errorMessage = i18next.t("messages:zeroTotalInvoice", {
11970
12334
  returnObjects: true
11971
12335
  });
11972
- return notify$1.error(errorMessage);
12336
+ return notify.error(errorMessage);
11973
12337
  }
11974
12338
  return switchView("invoice-details");
11975
12339
  });
@@ -11994,7 +12358,7 @@ const showSubscriptionManageMembersFromUrl = () => {
11994
12358
  const errorMessage = i18next.t("messages:invalidSubscription", {
11995
12359
  returnObjects: true
11996
12360
  });
11997
- return notify$1.error(errorMessage);
12361
+ return notify.error(errorMessage);
11998
12362
  }
11999
12363
  return switchView("manage-members");
12000
12364
  });
@@ -12019,8 +12383,18 @@ const PelcroModalController = _ref => {
12019
12383
  const {
12020
12384
  view,
12021
12385
  isAuthenticated,
12022
- whenSiteReady
12386
+ whenSiteReady,
12387
+ isDonation
12023
12388
  } = usePelcro();
12389
+ const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_gateway_settings);
12390
+ const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
12391
+ React__default['default'].useEffect(() => {
12392
+ if (isDonation) {
12393
+ if (!window.Stripe && !supportsVantiv && !supportsTap) {
12394
+ pure_1(window.Pelcro.environment.stripe);
12395
+ }
12396
+ }
12397
+ }, [isDonation]);
12024
12398
  React__default['default'].useEffect(() => {
12025
12399
  init$1();
12026
12400
  renderShopView(React__default['default'].Children.map(children, child => child).find(_ref2 => {
@@ -14544,10 +14918,405 @@ function SelectModalWithHook(props) {
14544
14918
  (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
14545
14919
  resetView();
14546
14920
  },
14547
- setProductAndPlan: (product, plan, isGift) => set({
14921
+ setProductAndPlan: (product, plan, isGift) => set({
14922
+ product,
14923
+ plan,
14924
+ isGift
14925
+ }),
14926
+ setView: switchView,
14927
+ matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
14928
+ });
14929
+ }
14930
+ function productsWithMatchedTaggedFirst$1() {
14931
+ var _window$Pelcro$produc;
14932
+ const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
14933
+ const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
14934
+ const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
14935
+ return [productsThatMatchArticleTag, allProductsMinusMatched];
14936
+ }
14937
+ function productMatchPageLanguage(product) {
14938
+ if (!product) {
14939
+ return false;
14940
+ }
14941
+ if (product.language === null) {
14942
+ return true;
14943
+ }
14944
+ const siteLanguage = window.Pelcro.helpers.getHtmlLanguageAttribute();
14945
+ return product.language === siteLanguage;
14946
+ }
14947
+ SelectModalWithHook.viewId = "plan-select";
14948
+ class SelectModal extends React.Component {
14949
+ constructor(props) {
14950
+ super(props);
14951
+ _defineProperty$3(this, "componentDidMount", () => {
14952
+ if (this.props.product) {
14953
+ const {
14954
+ product
14955
+ } = this.props;
14956
+ const planList = product.plans;
14957
+ this.setState({
14958
+ product,
14959
+ planList,
14960
+ mode: "plan"
14961
+ });
14962
+ }
14963
+ if (this.props.plan) {
14964
+ const {
14965
+ plan
14966
+ } = this.props;
14967
+ this.setState({
14968
+ plan,
14969
+ disabled: false
14970
+ });
14971
+ }
14972
+ if (this.state.productList.length === 1) {
14973
+ this.setState({
14974
+ product: this.state.productList[0],
14975
+ planList: this.state.productList[0].plans,
14976
+ mode: "plan"
14977
+ });
14978
+ }
14979
+ if (this.state.productList.length === 0 && !window.Pelcro.user.isAuthenticated()) {
14980
+ this.props.setView("register");
14981
+ }
14982
+ document.addEventListener("keydown", this.handleSubmit);
14983
+ if (!document.querySelector("#pelcro-selection-view") || !document.querySelector(".pelcro-select-product-wrapper")) {
14984
+ var _window$Pelcro2, _window$Pelcro2$user, _window$Pelcro3, _window$Pelcro3$user, _window$Pelcro4, _window$Pelcro4$user, _window$Pelcro5, _window$Pelcro5$site;
14985
+ const userCurrency = (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$user = _window$Pelcro2.user) === null || _window$Pelcro2$user === void 0 ? void 0 : _window$Pelcro2$user.read().currency;
14986
+ const userCountry = (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$user = _window$Pelcro3.user) === null || _window$Pelcro3$user === void 0 ? void 0 : _window$Pelcro3$user.location.countryCode;
14987
+ const userLanguage = (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : (_window$Pelcro4$user = _window$Pelcro4.user) === null || _window$Pelcro4$user === void 0 ? void 0 : _window$Pelcro4$user.read().language;
14988
+ const productsMatchingUserCurrency = (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : (_window$Pelcro5$site = _window$Pelcro5.site) === null || _window$Pelcro5$site === void 0 ? void 0 : _window$Pelcro5$site.read().products.filter(product => {
14989
+ const filteredPlans = product.plans.filter(plan => plan.currency === userCurrency || !userCurrency);
14990
+ if (filteredPlans.length) return filteredPlans;
14991
+ });
14992
+ const productsMatchingUserCountry = productsMatchingUserCurrency.filter(product => {
14993
+ const filteredPlans = product.plans.filter(plan => {
14994
+ var _plan$countries;
14995
+ return plan.countries && ((_plan$countries = plan.countries) === null || _plan$countries === void 0 ? void 0 : _plan$countries.includes(userCountry)) || !plan.countries || !plan.countries.length;
14996
+ });
14997
+ if (filteredPlans.length) return filteredPlans;
14998
+ });
14999
+ notifyBugsnag(() => {
15000
+ Bugsnag.notify("SelectModal - No data viewed", event => {
15001
+ var _window$Pelcro6, _window$Pelcro6$site, _window$Pelcro7, _window$Pelcro7$user, _window$Pelcro8, _window$Pelcro8$uiSet, _window$Pelcro9, _this$props, _window$Pelcro10, _window$Pelcro10$help, _window$Pelcro11, _window$Pelcro11$site;
15002
+ event.addMetadata("MetaData", {
15003
+ site: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$site = _window$Pelcro6.site) === null || _window$Pelcro6$site === void 0 ? void 0 : _window$Pelcro6$site.read(),
15004
+ user: (_window$Pelcro7 = window.Pelcro) === null || _window$Pelcro7 === void 0 ? void 0 : (_window$Pelcro7$user = _window$Pelcro7.user) === null || _window$Pelcro7$user === void 0 ? void 0 : _window$Pelcro7$user.read(),
15005
+ uiVersion: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : (_window$Pelcro8$uiSet = _window$Pelcro8.uiSettings) === null || _window$Pelcro8$uiSet === void 0 ? void 0 : _window$Pelcro8$uiSet.uiVersion,
15006
+ environment: (_window$Pelcro9 = window.Pelcro) === null || _window$Pelcro9 === void 0 ? void 0 : _window$Pelcro9.environment,
15007
+ matchingEntitlementsProps: (_this$props = this.props) === null || _this$props === void 0 ? void 0 : _this$props.matchingEntitlements,
15008
+ productListState: this.state.productList,
15009
+ methods: {
15010
+ productsWithMatchedTaggedFirst: productsWithMatchedTaggedFirst$1(),
15011
+ pelcroSDKProductsListMethod: window.Pelcro.product.list(),
15012
+ pelcroSDKGetByEntitlements: this.props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(this.props.matchingEntitlements) : null
15013
+ },
15014
+ userCurrency: userCurrency,
15015
+ userCountry: userCountry,
15016
+ userLanguage: userLanguage,
15017
+ siteLanguage: (_window$Pelcro10 = window.Pelcro) === null || _window$Pelcro10 === void 0 ? void 0 : (_window$Pelcro10$help = _window$Pelcro10.helpers) === null || _window$Pelcro10$help === void 0 ? void 0 : _window$Pelcro10$help.getHtmlLanguageAttribute(),
15018
+ products: (_window$Pelcro11 = window.Pelcro) === null || _window$Pelcro11 === void 0 ? void 0 : (_window$Pelcro11$site = _window$Pelcro11.site) === null || _window$Pelcro11$site === void 0 ? void 0 : _window$Pelcro11$site.read().products.length,
15019
+ currency_matching_filter: `${productsMatchingUserCurrency.length} Products Passed`,
15020
+ country_matching_filter: `${productsMatchingUserCountry.length} Products Passed`,
15021
+ language_matching_filter: `${productsMatchingUserCountry.filter(productMatchPageLanguage).length} Products Passed`
15022
+ });
15023
+ });
15024
+ });
15025
+ }
15026
+ });
15027
+ _defineProperty$3(this, "componentWillUnmount", () => {
15028
+ document.removeEventListener("keydown", this.handleSubmit);
15029
+ });
15030
+ _defineProperty$3(this, "handleSubmit", e => {
15031
+ if (e.key === "Enter" && !this.state.disabled) this.submitOption();
15032
+ });
15033
+ _defineProperty$3(this, "onProductChange", e => {
15034
+ const product = window.Pelcro.product.list()[e.target.selectedIndex];
15035
+ this.setState({
15036
+ product: product,
15037
+ plan: product.plans[0]
15038
+ });
15039
+ });
15040
+ _defineProperty$3(this, "onPlanChange", e => {
15041
+ this.setState({
15042
+ plan: this.state.product.plans[e.target.selectedIndex]
15043
+ });
15044
+ });
15045
+ _defineProperty$3(this, "onIsGiftChange", e => {
15046
+ this.setState({
15047
+ isGift: e.target.checked
15048
+ });
15049
+ });
15050
+ _defineProperty$3(this, "countStartPrice", arr => {
15051
+ let startingPlan = arr[0];
15052
+ for (const plan of arr) {
15053
+ if (plan.amount < startingPlan.amount) {
15054
+ startingPlan = plan;
15055
+ }
15056
+ }
15057
+ return `${startingPlan.amount_formatted}/${startingPlan.interval_count > 1 ? `${startingPlan.interval_count} ${startingPlan.interval}s` : `${startingPlan.interval}`}`;
15058
+ });
15059
+ _defineProperty$3(this, "renderOneProduct", (product, index, options) => {
15060
+ const isPlanMode = Boolean(this.state.mode === "plan");
15061
+ const productButtonLabel = isPlanMode ? this.locale("buttons.back") : this.locale("buttons.select");
15062
+ const productButtonCallback = isPlanMode ? this.goBack : this.selectProduct;
15063
+ return /*#__PURE__*/React__default['default'].createElement("div", {
15064
+ key: product.id,
15065
+ className: `plc-flex plc-items-start plc-p-2 plc-mt-4 plc-space-x-3 plc-text-gray-900 plc-border-solid plc-rounded plc-border-primary-500 pelcro-select-product-wrapper ${options !== null && options !== void 0 && options.emphasize ? "plc-border-2" : "plc-border"}`
15066
+ }, product.image && /*#__PURE__*/React__default['default'].createElement("img", {
15067
+ alt: `image of ${product.name}`,
15068
+ src: product.image,
15069
+ className: "plc-object-contain plc-w-1/4 pelcro-select-product-image"
15070
+ }), /*#__PURE__*/React__default['default'].createElement("div", {
15071
+ className: `plc-flex plc-flex-wrap ${product.image ? "plc-w-3/4" : "plc-w-full"}`
15072
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
15073
+ className: "plc-w-full pelcro-select-product-header"
15074
+ }, /*#__PURE__*/React__default['default'].createElement("p", {
15075
+ className: "plc-font-bold pelcro-select-product-title"
15076
+ }, product.name), /*#__PURE__*/React__default['default'].createElement("p", {
15077
+ className: "plc-text-xs pelcro-select-product-description"
15078
+ }, product.description)), /*#__PURE__*/React__default['default'].createElement("div", {
15079
+ className: "plc-flex plc-items-end plc-w-full plc-mt-3"
15080
+ }, product.plans && /*#__PURE__*/React__default['default'].createElement("p", {
15081
+ className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
15082
+ }, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
15083
+ onClick: productButtonCallback,
15084
+ "data-key": product.id,
15085
+ id: "pelcro-select-product-back-button",
15086
+ className: `plc-ml-auto plc-text-xs ${options !== null && options !== void 0 && options.emphasize ? "plc-bg-primary-700" : ""}`
15087
+ }, index === 0 && {
15088
+ autoFocus: true
15089
+ }), productButtonLabel))));
15090
+ });
15091
+ _defineProperty$3(this, "renderProducts", () => {
15092
+ const userDidSelectProduct = Boolean(this.state.mode === "plan");
15093
+ const productsToShow = userDidSelectProduct ? [this.state.product] : this.state.productList;
15094
+ return productsToShow.map((product, index) => {
15095
+ if (product.plans.filter(plan => plan.type === "regular").length > 0) {
15096
+ return this.renderOneProduct(product, index);
15097
+ }
15098
+ });
15099
+ });
15100
+ _defineProperty$3(this, "renderMatchingProductsFirst", () => {
15101
+ const isPlanMode = Boolean(this.state.mode === "plan");
15102
+ if (isPlanMode) {
15103
+ return this.renderOneProduct(this.state.product);
15104
+ }
15105
+ const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst$1();
15106
+
15107
+ // Render normal products if there are no available matching products
15108
+ if (!(productsThatMatchArticleTag !== null && productsThatMatchArticleTag !== void 0 && productsThatMatchArticleTag.length)) {
15109
+ return this.renderProducts();
15110
+ }
15111
+ return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("h3", {
15112
+ className: "plc-text-sm plc-font-semibold"
15113
+ }, this.locale("labels.restrictiveArticles.subscribeTo")), productsThatMatchArticleTag.map((product, index) => this.renderOneProduct(product, index, {
15114
+ emphasize: true
15115
+ })), (allProductsMinusMatched === null || allProductsMinusMatched === void 0 ? void 0 : allProductsMinusMatched.length) > 0 && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("hr", {
15116
+ className: "plc-my-4"
15117
+ }), /*#__PURE__*/React__default['default'].createElement("h3", {
15118
+ className: "plc-text-sm plc-font-semibold"
15119
+ }, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
15120
+ });
15121
+ _defineProperty$3(this, "renderPlans", () => {
15122
+ return this.state.planList.map(plan => {
15123
+ const isChecked = this.state.plan.id === plan.id ? true : false;
15124
+ return /*#__PURE__*/React__default['default'].createElement("div", {
15125
+ key: plan.id,
15126
+ className: "plc-p-2 plc-mx-3 plc-mt-2 plc-text-gray-900 plc-border plc-border-gray-400 plc-border-solid plc-rounded pelcro-select-plan-wrapper"
15127
+ }, /*#__PURE__*/React__default['default'].createElement(Radio, {
15128
+ className: "plc-self-start pelcro-select-plan-radio",
15129
+ labelClassName: "plc-cursor-pointer plc-w-full",
15130
+ id: `pelcro-select-plan-${plan.id}`,
15131
+ name: "plan",
15132
+ checked: isChecked,
15133
+ "data-key": plan.id,
15134
+ onChange: this.selectPlan
15135
+ }, /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("p", {
15136
+ className: "plc-font-bold pelcro-select-plan-title"
15137
+ }, plan.nickname), /*#__PURE__*/React__default['default'].createElement("p", {
15138
+ className: "plc-text-xs pelcro-select-plan-description"
15139
+ }, plan.description)), /*#__PURE__*/React__default['default'].createElement("p", {
15140
+ className: "plc-mt-3 plc-font-bold pelcro-select-plan-price"
15141
+ }, plan.amount_formatted)));
15142
+ });
15143
+ });
15144
+ _defineProperty$3(this, "selectProduct", e => {
15145
+ const id = e.target.dataset.key;
15146
+ for (const product of this.state.productList) {
15147
+ if (+product.id === +id) {
15148
+ var _this$state$plan;
15149
+ this.setState({
15150
+ product: product
15151
+ });
15152
+ this.setState({
15153
+ planList: product.plans.filter(plan => plan.type === "regular")
15154
+ });
15155
+ this.setState({
15156
+ mode: "plan"
15157
+ });
15158
+ const isSelectedPlanPartOfThisProduct = ((_this$state$plan = this.state.plan) === null || _this$state$plan === void 0 ? void 0 : _this$state$plan.product_id) === Number(product.id);
15159
+ if (isSelectedPlanPartOfThisProduct) {
15160
+ this.setState({
15161
+ disabled: false
15162
+ });
15163
+ }
15164
+ }
15165
+ }
15166
+ });
15167
+ _defineProperty$3(this, "selectPlan", e => {
15168
+ const id = e.target.dataset.key;
15169
+ for (const plan of this.state.planList) {
15170
+ if (+plan.id === +id) {
15171
+ plan.isCheked = true;
15172
+ this.setState({
15173
+ plan: plan
15174
+ });
15175
+ this.setState({
15176
+ disabled: false
15177
+ });
15178
+ } else {
15179
+ plan.isCheked = false;
15180
+ }
15181
+ }
15182
+ });
15183
+ _defineProperty$3(this, "goBack", () => {
15184
+ this.setState({
15185
+ disabled: true
15186
+ });
15187
+ this.setState({
15188
+ mode: "product"
15189
+ });
15190
+ });
15191
+ _defineProperty$3(this, "submitOption", () => {
15192
+ this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift);
15193
+ const {
15194
+ product,
15195
+ isGift
15196
+ } = this.state;
15197
+ const {
15198
+ setView
15199
+ } = this.props;
15200
+ const isAuthenticated = window.Pelcro.user.isAuthenticated();
15201
+ const {
15202
+ switchToAddressView,
15203
+ switchToPaymentView
15204
+ } = usePelcro.getStore();
15205
+ if (!isAuthenticated) {
15206
+ return setView("register");
15207
+ }
15208
+ if (isGift) {
15209
+ return setView("gift-create");
15210
+ }
15211
+ if (product.address_required) {
15212
+ return switchToAddressView();
15213
+ }
15214
+ return switchToPaymentView();
15215
+ });
15216
+ _defineProperty$3(this, "displayLoginView", () => {
15217
+ this.props.setView("login");
15218
+ });
15219
+ this.state = {
15220
+ product: {},
15221
+ plan: {},
15222
+ isGift: props.isGift,
15223
+ disabled: true,
15224
+ mode: "product",
15225
+ productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
15226
+ };
15227
+ this.product = this.props.product || window.Pelcro.paywall.getProduct();
15228
+ this.locale = this.props.t;
15229
+ this.closeButton = window.Pelcro.paywall.displayCloseButton();
15230
+ }
15231
+ render() {
15232
+ var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
15233
+ const {
15234
+ disableGifting
15235
+ } = this.props;
15236
+ if (this.state.mode === "product") {
15237
+ var _ReactGA$event;
15238
+ ReactGA$7 === null || ReactGA$7 === void 0 ? void 0 : (_ReactGA$event = ReactGA$7.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$7, {
15239
+ category: "VIEWS",
15240
+ action: "Product Modal Viewed",
15241
+ nonInteraction: true
15242
+ });
15243
+ } else if (this.state.mode === "plan") {
15244
+ var _ReactGA$event2;
15245
+ ReactGA$7 === null || ReactGA$7 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$7.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$7, {
15246
+ category: "VIEWS",
15247
+ action: "Plan Modal Viewed",
15248
+ nonInteraction: true
15249
+ });
15250
+ }
15251
+ return /*#__PURE__*/React__default['default'].createElement(Modal, {
15252
+ hideCloseButton: !this.closeButton,
15253
+ onClose: this.props.onClose,
15254
+ id: "pelcro-selection-modal"
15255
+ }, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement("div", {
15256
+ id: "pelcro-selection-view"
15257
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
15258
+ className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
15259
+ }, /*#__PURE__*/React__default['default'].createElement("h4", {
15260
+ className: "plc-text-2xl plc-font-semibold"
15261
+ }, 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", {
15262
+ className: "pelcro-select-products-wrapper"
15263
+ }, (_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", {
15264
+ className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
15265
+ }, this.renderPlans()), !disableGifting && /*#__PURE__*/React__default['default'].createElement("div", {
15266
+ className: "plc-flex plc-justify-center plc-mt-2"
15267
+ }, /*#__PURE__*/React__default['default'].createElement(Checkbox, {
15268
+ onChange: this.onIsGiftChange,
15269
+ checked: this.state.isGift,
15270
+ id: "pelcro-input-is-gift"
15271
+ }, this.locale("messages.checkbox"))), /*#__PURE__*/React__default['default'].createElement(Button, {
15272
+ disabled: this.state.disabled,
15273
+ onClick: this.submitOption,
15274
+ id: "pelcro-submit",
15275
+ className: "plc-w-full plc-mt-2"
15276
+ }, this.locale("buttons.next"))))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, !window.Pelcro.user.isAuthenticated() && /*#__PURE__*/React__default['default'].createElement("p", null, this.locale("messages.alreadyHaveAccount") + " ", /*#__PURE__*/React__default['default'].createElement(Link, {
15277
+ id: "pelcro-link-login",
15278
+ onClick: this.displayLoginView
15279
+ }, this.locale("messages.loginHere"))), /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
15280
+ }
15281
+ }
15282
+ const SelectModalWithTrans = withTranslation("select")(SelectModal);
15283
+
15284
+ /**
15285
+ *
15286
+ */
15287
+ function DonationModalWithHook(props) {
15288
+ React__default['default'].useEffect(() => {
15289
+ var _props$onDisplay;
15290
+ (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
15291
+ }, []);
15292
+ const {
15293
+ isGift,
15294
+ plan,
15295
+ product,
15296
+ isRenewingGift,
15297
+ switchView,
15298
+ resetView,
15299
+ view,
15300
+ set
15301
+ } = usePelcro();
15302
+ const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
15303
+ const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
15304
+ return /*#__PURE__*/React__default['default'].createElement(DonationModalWithTrans, {
15305
+ isGift: isGift,
15306
+ disableGifting: isRenewingGift,
15307
+ plan: plan,
15308
+ product: product,
15309
+ onClose: () => {
15310
+ var _props$onClose;
15311
+ (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
15312
+ resetView();
15313
+ },
15314
+ setProductAndPlan: (product, plan, isGift, selectedDonationAmount, customDonationAmount) => set({
14548
15315
  product,
14549
15316
  plan,
14550
- isGift
15317
+ isGift,
15318
+ selectedDonationAmount,
15319
+ customDonationAmount
14551
15320
  }),
14552
15321
  setView: switchView,
14553
15322
  matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
@@ -14560,18 +15329,8 @@ function productsWithMatchedTaggedFirst() {
14560
15329
  const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
14561
15330
  return [productsThatMatchArticleTag, allProductsMinusMatched];
14562
15331
  }
14563
- function productMatchPageLanguage(product) {
14564
- if (!product) {
14565
- return false;
14566
- }
14567
- if (product.language === null) {
14568
- return true;
14569
- }
14570
- const siteLanguage = window.Pelcro.helpers.getHtmlLanguageAttribute();
14571
- return product.language === siteLanguage;
14572
- }
14573
- SelectModalWithHook.viewId = "plan-select";
14574
- class SelectModal extends React.Component {
15332
+ DonationModalWithHook.viewId = "donation-select";
15333
+ class DonationModal extends React.Component {
14575
15334
  constructor(props) {
14576
15335
  super(props);
14577
15336
  _defineProperty$3(this, "componentDidMount", () => {
@@ -14602,53 +15361,39 @@ class SelectModal extends React.Component {
14602
15361
  mode: "plan"
14603
15362
  });
14604
15363
  }
14605
- if (this.state.productList.length === 0 && !window.Pelcro.user.isAuthenticated()) {
14606
- this.props.setView("register");
14607
- }
15364
+
15365
+ // if (
15366
+ // this.state.productList.length === 0 &&
15367
+ // !window.Pelcro.user.isAuthenticated()
15368
+ // ) {
15369
+ // this.props.setView("register");
15370
+ // }
15371
+
14608
15372
  document.addEventListener("keydown", this.handleSubmit);
14609
15373
  if (!document.querySelector("#pelcro-selection-view") || !document.querySelector(".pelcro-select-product-wrapper")) {
14610
- var _window$Pelcro2, _window$Pelcro2$user, _window$Pelcro3, _window$Pelcro3$user, _window$Pelcro4, _window$Pelcro4$user, _window$Pelcro5, _window$Pelcro5$site;
14611
- const userCurrency = (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$user = _window$Pelcro2.user) === null || _window$Pelcro2$user === void 0 ? void 0 : _window$Pelcro2$user.read().currency;
14612
- const userCountry = (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$user = _window$Pelcro3.user) === null || _window$Pelcro3$user === void 0 ? void 0 : _window$Pelcro3$user.location.countryCode;
14613
- const userLanguage = (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : (_window$Pelcro4$user = _window$Pelcro4.user) === null || _window$Pelcro4$user === void 0 ? void 0 : _window$Pelcro4$user.read().language;
14614
- const productsMatchingUserCurrency = (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : (_window$Pelcro5$site = _window$Pelcro5.site) === null || _window$Pelcro5$site === void 0 ? void 0 : _window$Pelcro5$site.read().products.filter(product => {
15374
+ var _window$Pelcro, _window$Pelcro$user, _window$Pelcro2, _window$Pelcro2$user, _window$Pelcro3, _window$Pelcro3$user, _window$Pelcro4, _window$Pelcro4$site;
15375
+ const userCurrency = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$user = _window$Pelcro.user) === null || _window$Pelcro$user === void 0 ? void 0 : _window$Pelcro$user.read().currency;
15376
+ const userCountry = (_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$user = _window$Pelcro2.user) === null || _window$Pelcro2$user === void 0 ? void 0 : _window$Pelcro2$user.location.countryCode;
15377
+ (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$user = _window$Pelcro3.user) === null || _window$Pelcro3$user === void 0 ? void 0 : _window$Pelcro3$user.read().language;
15378
+ const productsMatchingUserCurrency = (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : (_window$Pelcro4$site = _window$Pelcro4.site) === null || _window$Pelcro4$site === void 0 ? void 0 : _window$Pelcro4$site.read().products.filter(product => {
14615
15379
  const filteredPlans = product.plans.filter(plan => plan.currency === userCurrency || !userCurrency);
14616
15380
  if (filteredPlans.length) return filteredPlans;
14617
15381
  });
14618
- const productsMatchingUserCountry = productsMatchingUserCurrency.filter(product => {
15382
+ productsMatchingUserCurrency.filter(product => {
14619
15383
  const filteredPlans = product.plans.filter(plan => {
14620
15384
  var _plan$countries;
14621
15385
  return plan.countries && ((_plan$countries = plan.countries) === null || _plan$countries === void 0 ? void 0 : _plan$countries.includes(userCountry)) || !plan.countries || !plan.countries.length;
14622
15386
  });
14623
15387
  if (filteredPlans.length) return filteredPlans;
14624
15388
  });
14625
- notifyBugsnag(() => {
14626
- Bugsnag.notify("SelectModal - No data viewed", event => {
14627
- var _window$Pelcro6, _window$Pelcro6$site, _window$Pelcro7, _window$Pelcro7$user, _window$Pelcro8, _window$Pelcro8$uiSet, _window$Pelcro9, _this$props, _window$Pelcro10, _window$Pelcro10$help, _window$Pelcro11, _window$Pelcro11$site;
14628
- event.addMetadata("MetaData", {
14629
- site: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$site = _window$Pelcro6.site) === null || _window$Pelcro6$site === void 0 ? void 0 : _window$Pelcro6$site.read(),
14630
- user: (_window$Pelcro7 = window.Pelcro) === null || _window$Pelcro7 === void 0 ? void 0 : (_window$Pelcro7$user = _window$Pelcro7.user) === null || _window$Pelcro7$user === void 0 ? void 0 : _window$Pelcro7$user.read(),
14631
- uiVersion: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : (_window$Pelcro8$uiSet = _window$Pelcro8.uiSettings) === null || _window$Pelcro8$uiSet === void 0 ? void 0 : _window$Pelcro8$uiSet.uiVersion,
14632
- environment: (_window$Pelcro9 = window.Pelcro) === null || _window$Pelcro9 === void 0 ? void 0 : _window$Pelcro9.environment,
14633
- matchingEntitlementsProps: (_this$props = this.props) === null || _this$props === void 0 ? void 0 : _this$props.matchingEntitlements,
14634
- productListState: this.state.productList,
14635
- methods: {
14636
- productsWithMatchedTaggedFirst: productsWithMatchedTaggedFirst(),
14637
- pelcroSDKProductsListMethod: window.Pelcro.product.list(),
14638
- pelcroSDKGetByEntitlements: this.props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(this.props.matchingEntitlements) : null
14639
- },
14640
- userCurrency: userCurrency,
14641
- userCountry: userCountry,
14642
- userLanguage: userLanguage,
14643
- siteLanguage: (_window$Pelcro10 = window.Pelcro) === null || _window$Pelcro10 === void 0 ? void 0 : (_window$Pelcro10$help = _window$Pelcro10.helpers) === null || _window$Pelcro10$help === void 0 ? void 0 : _window$Pelcro10$help.getHtmlLanguageAttribute(),
14644
- products: (_window$Pelcro11 = window.Pelcro) === null || _window$Pelcro11 === void 0 ? void 0 : (_window$Pelcro11$site = _window$Pelcro11.site) === null || _window$Pelcro11$site === void 0 ? void 0 : _window$Pelcro11$site.read().products.length,
14645
- currency_matching_filter: `${productsMatchingUserCurrency.length} Products Passed`,
14646
- country_matching_filter: `${productsMatchingUserCountry.length} Products Passed`,
14647
- language_matching_filter: `${productsMatchingUserCountry.filter(productMatchPageLanguage).length} Products Passed`
14648
- });
14649
- });
15389
+ }
15390
+ });
15391
+ _defineProperty$3(this, "componentDidUpdate", (prevProps, prevState) => {
15392
+ var _this$state$planList;
15393
+ if (((_this$state$planList = this.state.planList) === null || _this$state$planList === void 0 ? void 0 : _this$state$planList.length) === 1 && this.state.plan !== this.state.planList[0]) {
15394
+ this.setState({
15395
+ plan: this.state.planList[0]
14650
15396
  });
14651
- console.log("bugsnag Triggered");
14652
15397
  }
14653
15398
  });
14654
15399
  _defineProperty$3(this, "componentWillUnmount", () => {
@@ -14704,9 +15449,7 @@ class SelectModal extends React.Component {
14704
15449
  className: "plc-text-xs pelcro-select-product-description"
14705
15450
  }, product.description)), /*#__PURE__*/React__default['default'].createElement("div", {
14706
15451
  className: "plc-flex plc-items-end plc-w-full plc-mt-3"
14707
- }, product.plans && /*#__PURE__*/React__default['default'].createElement("p", {
14708
- className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
14709
- }, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
15452
+ }, /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
14710
15453
  onClick: productButtonCallback,
14711
15454
  "data-key": product.id,
14712
15455
  id: "pelcro-select-product-back-button",
@@ -14746,24 +15489,90 @@ class SelectModal extends React.Component {
14746
15489
  _defineProperty$3(this, "renderPlans", () => {
14747
15490
  return this.state.planList.map(plan => {
14748
15491
  const isChecked = this.state.plan.id === plan.id ? true : false;
15492
+ let planDetails = /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
15493
+ className: "plc-bg-gray-100 plc-rounded-md plc-p-3 plc-mt-3 plc-text-sm plc-flex plc-items-center"
15494
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
15495
+ className: "plc-flex plc-items-center plc-flex-1"
15496
+ }, "Auto renew:", " ", /*#__PURE__*/React__default['default'].createElement("span", {
15497
+ className: "plc-inline-flex plc-w-6 plc-ml-1"
15498
+ }, plan.auto_renew ? /*#__PURE__*/React__default['default'].createElement(SvgCheck, {
15499
+ className: "plc-text-green-500"
15500
+ }) : /*#__PURE__*/React__default['default'].createElement(SvgXIcon, {
15501
+ className: "plc-text-red-500"
15502
+ })), " "), /*#__PURE__*/React__default['default'].createElement("div", {
15503
+ className: "plc-flex plc-items-center plc-flex-1"
15504
+ }, "Renewed every:", " ", /*#__PURE__*/React__default['default'].createElement("span", {
15505
+ className: "plc-inline-flex plc-w-6 plc-ml-1 plc-font-bold plc-capitalize"
15506
+ }, plan.interval || "-"))), plan.preset_donation_values && /*#__PURE__*/React__default['default'].createElement("div", {
15507
+ className: "plc-mt-3 plc-pt-3 plc-border-t plc-border-gray-200"
15508
+ }, /*#__PURE__*/React__default['default'].createElement("h5", {
15509
+ className: "plc-mb-4 plc-font-medium plc-text-center"
15510
+ }, "Select amount"), /*#__PURE__*/React__default['default'].createElement("ul", {
15511
+ className: "plc-grid plc-grid-cols-2 plc-gap-3"
15512
+ }, plan.preset_donation_values.map(value => /*#__PURE__*/React__default['default'].createElement("li", {
15513
+ key: value
15514
+ }, /*#__PURE__*/React__default['default'].createElement("button", {
15515
+ className: `plc-bg-white plc-rounded-md plc-flex plc-items-center plc-justify-center plc-text-lg plc-w-full plc-min-h-16 focus:plc-outline-none ${isChecked && +this.state.selectedDonationAmount === +value ? "plc-border-primary-500 plc-text-primary-900 plc-border-2" : "plc-border-gray-200 plc-text-gray-900 plc-border"}`,
15516
+ onClick: () => {
15517
+ this.setState({
15518
+ selectedDonationAmount: +value,
15519
+ customDonationAmount: "",
15520
+ disabled: false
15521
+ });
15522
+ }
15523
+ }, /*#__PURE__*/React__default['default'].createElement("span", {
15524
+ className: "plc-font-bold plc-mr-1"
15525
+ }, value), /*#__PURE__*/React__default['default'].createElement("span", {
15526
+ className: "plc-uppercase"
15527
+ }, plan === null || plan === void 0 ? void 0 : plan.currency))))), /*#__PURE__*/React__default['default'].createElement("div", {
15528
+ className: "plc-relative plc-py-3 plc-mt-3"
15529
+ }, /*#__PURE__*/React__default['default'].createElement("hr", null), " ", /*#__PURE__*/React__default['default'].createElement("span", {
15530
+ className: "plc-absolute plc-top-1/2 plc-left-1/2 plc-transform plc--translate-x-1/2 plc--translate-y-1/2 plc-leading-none plc-bg-white plc-px-2"
15531
+ }, "or"))), /*#__PURE__*/React__default['default'].createElement("div", {
15532
+ className: "plc-relative plc-mt-3"
15533
+ }, /*#__PURE__*/React__default['default'].createElement(Input, {
15534
+ type: "number",
15535
+ value: this.state.customDonationAmount,
15536
+ onChange: e => {
15537
+ if (+e.target.value > 0) {
15538
+ this.setState({
15539
+ customDonationAmount: +e.target.value,
15540
+ selectedDonationAmount: null,
15541
+ disabled: false
15542
+ });
15543
+ } else {
15544
+ this.setState({
15545
+ customDonationAmount: ""
15546
+ });
15547
+ this.setState({
15548
+ disabled: true
15549
+ });
15550
+ }
15551
+ },
15552
+ placeholder: "Donate a custom amount ...",
15553
+ className: "plc-pr-14",
15554
+ wrapperClassName: "plc-mb-0"
15555
+ }), /*#__PURE__*/React__default['default'].createElement("span", {
15556
+ className: "plc-absolute plc-top-1/2 plc-transform plc--translate-y-1/2 plc-right-3 plc-pl-3 plc-border-l plc-border-gray-200 plc-uppercase plc-text-sm"
15557
+ }, plan.currency)));
14749
15558
  return /*#__PURE__*/React__default['default'].createElement("div", {
14750
15559
  key: plan.id,
14751
- className: "plc-p-2 plc-mx-3 plc-mt-2 plc-text-gray-900 plc-border plc-border-gray-400 plc-border-solid plc-rounded pelcro-select-plan-wrapper"
15560
+ className: `plc-p-2 plc-mx-3 plc-mt-2 plc-text-gray-900 plc-border-solid plc-rounded pelcro-select-plan-wrapper ${isChecked ? "plc-border-primary-500 plc-border-2" : "plc-border-gray-400 plc-border "}`
14752
15561
  }, /*#__PURE__*/React__default['default'].createElement(Radio, {
14753
- className: "plc-self-start pelcro-select-plan-radio",
14754
- labelClassName: "plc-cursor-pointer plc-w-full",
15562
+ className: "plc-self-start pelcro-select-plan-radio plc-hidden",
15563
+ labelClassName: "plc-cursor-pointer plc-w-full plc-ml-0",
14755
15564
  id: `pelcro-select-plan-${plan.id}`,
14756
15565
  name: "plan",
14757
15566
  checked: isChecked,
14758
15567
  "data-key": plan.id,
14759
15568
  onChange: this.selectPlan
14760
- }, /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("p", {
15569
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
15570
+ className: "plc-text-center"
15571
+ }, /*#__PURE__*/React__default['default'].createElement("p", {
14761
15572
  className: "plc-font-bold pelcro-select-plan-title"
14762
15573
  }, plan.nickname), /*#__PURE__*/React__default['default'].createElement("p", {
14763
15574
  className: "plc-text-xs pelcro-select-plan-description"
14764
- }, plan.description)), /*#__PURE__*/React__default['default'].createElement("p", {
14765
- className: "plc-mt-3 plc-font-bold pelcro-select-plan-price"
14766
- }, plan.amount_formatted)));
15575
+ }, plan.description))), isChecked && planDetails);
14767
15576
  });
14768
15577
  });
14769
15578
  _defineProperty$3(this, "selectProduct", e => {
@@ -14771,13 +15580,15 @@ class SelectModal extends React.Component {
14771
15580
  for (const product of this.state.productList) {
14772
15581
  if (+product.id === +id) {
14773
15582
  var _this$state$plan;
15583
+ const planList = product.plans.filter(plan => plan.type === "donation");
15584
+ if (planList.length === 1) {
15585
+ this.setState({
15586
+ plan: planList[0]
15587
+ });
15588
+ }
14774
15589
  this.setState({
14775
- product: product
14776
- });
14777
- this.setState({
14778
- planList: product.plans
14779
- });
14780
- this.setState({
15590
+ product: product,
15591
+ planList: planList,
14781
15592
  mode: "plan"
14782
15593
  });
14783
15594
  const isSelectedPlanPartOfThisProduct = ((_this$state$plan = this.state.plan) === null || _this$state$plan === void 0 ? void 0 : _this$state$plan.product_id) === Number(product.id);
@@ -14790,6 +15601,12 @@ class SelectModal extends React.Component {
14790
15601
  }
14791
15602
  });
14792
15603
  _defineProperty$3(this, "selectPlan", e => {
15604
+ this.setState({
15605
+ selectedDonationAmount: null
15606
+ });
15607
+ this.setState({
15608
+ disabled: true
15609
+ });
14793
15610
  const id = e.target.dataset.key;
14794
15611
  for (const plan of this.state.planList) {
14795
15612
  if (+plan.id === +id) {
@@ -14797,9 +15614,6 @@ class SelectModal extends React.Component {
14797
15614
  this.setState({
14798
15615
  plan: plan
14799
15616
  });
14800
- this.setState({
14801
- disabled: false
14802
- });
14803
15617
  } else {
14804
15618
  plan.isCheked = false;
14805
15619
  }
@@ -14814,7 +15628,7 @@ class SelectModal extends React.Component {
14814
15628
  });
14815
15629
  });
14816
15630
  _defineProperty$3(this, "submitOption", () => {
14817
- this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift);
15631
+ this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift, this.state.selectedDonationAmount, this.state.customDonationAmount);
14818
15632
  const {
14819
15633
  product,
14820
15634
  isGift
@@ -14827,12 +15641,14 @@ class SelectModal extends React.Component {
14827
15641
  switchToAddressView,
14828
15642
  switchToPaymentView
14829
15643
  } = usePelcro.getStore();
14830
- if (!isAuthenticated) {
15644
+ if (!isAuthenticated && product.address_required) {
14831
15645
  return setView("register");
14832
15646
  }
14833
- if (isGift) {
14834
- return setView("gift-create");
14835
- }
15647
+
15648
+ // if (isGift) {
15649
+ // return setView("gift-create");
15650
+ // }
15651
+
14836
15652
  if (product.address_required) {
14837
15653
  return switchToAddressView();
14838
15654
  }
@@ -14841,13 +15657,16 @@ class SelectModal extends React.Component {
14841
15657
  _defineProperty$3(this, "displayLoginView", () => {
14842
15658
  this.props.setView("login");
14843
15659
  });
15660
+ const productList = props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements).filter(product => product.has_donation_plans === true) : window.Pelcro.product.list().filter(product => product.has_donation_plans === true);
14844
15661
  this.state = {
14845
15662
  product: {},
14846
15663
  plan: {},
14847
15664
  isGift: props.isGift,
14848
15665
  disabled: true,
14849
15666
  mode: "product",
14850
- productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
15667
+ productList: productList,
15668
+ selectedDonationAmount: null,
15669
+ customDonationAmount: ""
14851
15670
  };
14852
15671
  this.product = this.props.product || window.Pelcro.paywall.getProduct();
14853
15672
  this.locale = this.props.t;
@@ -14855,19 +15674,17 @@ class SelectModal extends React.Component {
14855
15674
  }
14856
15675
  render() {
14857
15676
  var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
14858
- const {
14859
- disableGifting
14860
- } = this.props;
15677
+ this.props;
14861
15678
  if (this.state.mode === "product") {
14862
15679
  var _ReactGA$event;
14863
- ReactGA$7 === null || ReactGA$7 === void 0 ? void 0 : (_ReactGA$event = ReactGA$7.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA$7, {
15680
+ ReactGA1 === null || ReactGA1 === void 0 ? void 0 : (_ReactGA$event = ReactGA1.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA1, {
14864
15681
  category: "VIEWS",
14865
15682
  action: "Product Modal Viewed",
14866
15683
  nonInteraction: true
14867
15684
  });
14868
15685
  } else if (this.state.mode === "plan") {
14869
15686
  var _ReactGA$event2;
14870
- ReactGA$7 === null || ReactGA$7 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA$7.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA$7, {
15687
+ ReactGA1 === null || ReactGA1 === void 0 ? void 0 : (_ReactGA$event2 = ReactGA1.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA1, {
14871
15688
  category: "VIEWS",
14872
15689
  action: "Plan Modal Viewed",
14873
15690
  nonInteraction: true
@@ -14886,25 +15703,16 @@ class SelectModal extends React.Component {
14886
15703
  }, 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", {
14887
15704
  className: "pelcro-select-products-wrapper"
14888
15705
  }, (_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", {
14889
- className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
14890
- }, this.renderPlans()), !disableGifting && /*#__PURE__*/React__default['default'].createElement("div", {
14891
- className: "plc-flex plc-justify-center plc-mt-2"
14892
- }, /*#__PURE__*/React__default['default'].createElement(Checkbox, {
14893
- onChange: this.onIsGiftChange,
14894
- checked: this.state.isGift,
14895
- id: "pelcro-input-is-gift"
14896
- }, this.locale("messages.checkbox"))), /*#__PURE__*/React__default['default'].createElement(Button, {
15706
+ className: "plc-overflow-y-scroll pelcro-select-plans-wrapper"
15707
+ }, this.renderPlans()), /*#__PURE__*/React__default['default'].createElement(Button, {
14897
15708
  disabled: this.state.disabled,
14898
- onClick: this.submitOption,
15709
+ onClick: () => this.submitOption(),
14899
15710
  id: "pelcro-submit",
14900
15711
  className: "plc-w-full plc-mt-2"
14901
- }, this.locale("buttons.next"))))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, !window.Pelcro.user.isAuthenticated() && /*#__PURE__*/React__default['default'].createElement("p", null, this.locale("messages.alreadyHaveAccount") + " ", /*#__PURE__*/React__default['default'].createElement(Link, {
14902
- id: "pelcro-link-login",
14903
- onClick: this.displayLoginView
14904
- }, this.locale("messages.loginHere"))), /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
15712
+ }, this.locale("buttons.donate"))))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
14905
15713
  }
14906
15714
  }
14907
- const SelectModalWithTrans = withTranslation("select")(SelectModal);
15715
+ const DonationModalWithTrans = withTranslation("donation")(DonationModal);
14908
15716
 
14909
15717
  var Provider_1 = createCommonjsModule(function (module, exports) {
14910
15718
 
@@ -17118,11 +17926,15 @@ const initialState$k = {
17118
17926
  firstName: "",
17119
17927
  lastName: "",
17120
17928
  phone: "",
17929
+ email: "",
17930
+ password: "",
17121
17931
  firstNameError: null,
17122
17932
  lastNameError: null,
17123
17933
  phoneError: null,
17934
+ emailError: null,
17124
17935
  month: "",
17125
17936
  year: "",
17937
+ passwordError: null,
17126
17938
  cyberSourceSessionId: null,
17127
17939
  alert: {
17128
17940
  type: "error",
@@ -17156,7 +17968,11 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17156
17968
  set,
17157
17969
  order,
17158
17970
  selectedPaymentMethodId,
17159
- couponCode
17971
+ couponCode,
17972
+ selectedDonationAmount,
17973
+ customDonationAmount,
17974
+ isAuthenticated,
17975
+ switchView
17160
17976
  } = usePelcro();
17161
17977
  const {
17162
17978
  whenUserReady
@@ -17188,6 +18004,22 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17188
18004
  });
17189
18005
  updateTotalAmountWithTax();
17190
18006
  }, []);
18007
+ const fireBugSnag = _ref2 => {
18008
+ let {
18009
+ error,
18010
+ title
18011
+ } = _ref2;
18012
+ notifyBugsnag(() => {
18013
+ Bugsnag.notify(title !== null && title !== void 0 ? title : "ERROR", event => {
18014
+ var _document$getElementB, _document$querySelect;
18015
+ event.addMetadata("MetaData", {
18016
+ error: error !== null && error !== void 0 ? error : "ERROR",
18017
+ paymentModalViewed: (_document$getElementB = !!document.getElementById("pelcro-subscription-create-modal")) !== null && _document$getElementB !== void 0 ? _document$getElementB : false,
18018
+ errorAppeared: (_document$querySelect = !!document.querySelector(".pelcro-alert-error")) !== null && _document$querySelect !== void 0 ? _document$querySelect : false
18019
+ });
18020
+ });
18021
+ });
18022
+ };
17191
18023
 
17192
18024
  /*====== Start Cybersource integration ========*/
17193
18025
  const cybersourceErrorHandle = err => {
@@ -17197,10 +18029,10 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17197
18029
  const errorMessages = [];
17198
18030
 
17199
18031
  // enumerable error (ex: validation errors)
17200
- Object.values(err === null || err === void 0 ? void 0 : (_err$details2 = err.details) === null || _err$details2 === void 0 ? void 0 : (_err$details2$respons = _err$details2.responseStatus) === null || _err$details2$respons === void 0 ? void 0 : _err$details2$respons.details).forEach(_ref2 => {
18032
+ Object.values(err === null || err === void 0 ? void 0 : (_err$details2 = err.details) === null || _err$details2 === void 0 ? void 0 : (_err$details2$respons = _err$details2.responseStatus) === null || _err$details2$respons === void 0 ? void 0 : _err$details2$respons.details).forEach(_ref3 => {
17201
18033
  let {
17202
18034
  message
17203
- } = _ref2;
18035
+ } = _ref3;
17204
18036
  errorMessages.push(message);
17205
18037
  });
17206
18038
 
@@ -17462,7 +18294,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17462
18294
 
17463
18295
  /*====== Start Tap integration ========*/
17464
18296
  const submitUsingTap = state => {
17465
- var _ref3, _ref4, _ref5, _state$updatedPrice;
18297
+ var _ref4, _ref5, _getPlanAmount;
17466
18298
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
17467
18299
  if (isUsingExistingPaymentMethod) {
17468
18300
  // no need to create a new source using tap
@@ -17486,7 +18318,15 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17486
18318
  return total + item.price * item.quantity;
17487
18319
  }, 0);
17488
18320
  };
17489
- const totalAmount = (_ref3 = (_ref4 = (_ref5 = (_state$updatedPrice = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref5 !== void 0 ? _ref5 : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref4 !== void 0 ? _ref4 : getOrderItemsTotal()) !== null && _ref3 !== void 0 ? _ref3 : 10;
18321
+ function getPlanAmount() {
18322
+ if (state.updatedPrice) return state.updatedPrice;
18323
+ if (plan.type === "donation" && (selectedDonationAmount || customDonationAmount)) {
18324
+ return selectedDonationAmount ? selectedDonationAmount * plan.amount : customDonationAmount * plan.amount;
18325
+ } else {
18326
+ return plan.amount;
18327
+ }
18328
+ }
18329
+ const totalAmount = (_ref4 = (_ref5 = (_getPlanAmount = getPlanAmount()) !== null && _getPlanAmount !== void 0 ? _getPlanAmount : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref5 !== void 0 ? _ref5 : getOrderItemsTotal()) !== null && _ref4 !== void 0 ? _ref4 : 10;
17490
18330
  tapInstanceRef.current.createToken(tapInstanceCard.current).then(function (result) {
17491
18331
  if (result.error) {
17492
18332
  // Inform the user if there was an error
@@ -17968,13 +18808,21 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17968
18808
  }, [selectedPaymentMethodId]);
17969
18809
  const initPaymentRequest = (state, dispatch) => {
17970
18810
  if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || props !== null && props !== void 0 && props.freeOrders)) return;
18811
+ function getPlanAmount() {
18812
+ if (state.updatedPrice) return state.updatedPrice;
18813
+ if (plan.type === "donation" && (selectedDonationAmount || customDonationAmount)) {
18814
+ return selectedDonationAmount ? selectedDonationAmount * plan.amount : customDonationAmount * plan.amount;
18815
+ } else {
18816
+ return plan.amount;
18817
+ }
18818
+ }
17971
18819
  try {
17972
18820
  const paymentRequest = stripe.paymentRequest({
17973
18821
  country: window.Pelcro.user.location.countryCode || "US",
17974
18822
  currency: plan.currency,
17975
18823
  total: {
17976
18824
  label: plan.nickname || plan.description,
17977
- amount: state.updatedPrice || plan.amount
18825
+ amount: getPlanAmount()
17978
18826
  }
17979
18827
  });
17980
18828
 
@@ -18006,7 +18854,12 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18006
18854
  error
18007
18855
  } = _ref7;
18008
18856
  if (error) {
18009
- return handlePaymentError(error);
18857
+ handlePaymentError(error);
18858
+ fireBugSnag({
18859
+ error,
18860
+ title: "generate3DSecureSource - ERROR"
18861
+ });
18862
+ return;
18010
18863
  }
18011
18864
  toggleAuthenticationPendingView(true, source);
18012
18865
  });
@@ -18290,13 +19143,18 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18290
19143
  });
18291
19144
  if (res.error) {
18292
19145
  onFailure(res.error);
18293
- return dispatch({
19146
+ dispatch({
18294
19147
  type: SHOW_ALERT,
18295
19148
  payload: {
18296
19149
  type: "error",
18297
19150
  content: isSubCreate ? t("messages.tryAgainFromInvoice") : getErrorMessages(res.error)
18298
19151
  }
18299
19152
  });
19153
+ fireBugSnag({
19154
+ error: getErrorMessages(res.error),
19155
+ title: "StripeConfirmCardPayment - ERROR"
19156
+ });
19157
+ return;
18300
19158
  }
18301
19159
  onSuccess(res);
18302
19160
  });
@@ -18312,13 +19170,18 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18312
19170
  payload: false
18313
19171
  });
18314
19172
  onFailure(error);
18315
- return dispatch({
19173
+ dispatch({
18316
19174
  type: SHOW_ALERT,
18317
19175
  payload: {
18318
19176
  type: "error",
18319
19177
  content: isSubCreate ? t("messages.tryAgainFromInvoice") : t("messages.cardAuthFailed")
18320
19178
  }
18321
19179
  });
19180
+ fireBugSnag({
19181
+ error: getErrorMessages(error),
19182
+ title: "StripeConfirmCardPayment - ERROR"
19183
+ });
19184
+ return;
18322
19185
  } else {
18323
19186
  onSuccess(response);
18324
19187
  }
@@ -18333,13 +19196,18 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18333
19196
  });
18334
19197
  if (error) {
18335
19198
  onFailure(error);
18336
- return dispatch({
19199
+ dispatch({
18337
19200
  type: SHOW_ALERT,
18338
19201
  payload: {
18339
19202
  type: "error",
18340
19203
  content: getErrorMessages(error)
18341
19204
  }
18342
19205
  });
19206
+ fireBugSnag({
19207
+ error: getErrorMessages(error),
19208
+ title: "StripeConfirmCardPayment - ERROR"
19209
+ });
19210
+ return;
18343
19211
  }
18344
19212
  onSuccess(response);
18345
19213
  }
@@ -18665,6 +19533,50 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18665
19533
  }
18666
19534
  });
18667
19535
  };
19536
+ const sendRegisterRequest = (state, callback) => {
19537
+ window.Pelcro.user.register({
19538
+ email: state.email,
19539
+ password: generatePassword()
19540
+ }, (err, res) => {
19541
+ if (err) {
19542
+ var _err$response, _err$response$data;
19543
+ let {
19544
+ registered_on_other_sites,
19545
+ ...errors
19546
+ } = err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.errors;
19547
+ err.response.data.errors = {
19548
+ ...errors
19549
+ };
19550
+ let errorContent;
19551
+ if (getErrorMessages(err) === "This email is already in use.") {
19552
+ errorContent = /*#__PURE__*/React__default['default'].createElement("p", null, "This email is already in use.", " ", /*#__PURE__*/React__default['default'].createElement("button", {
19553
+ className: "plc-font-bold plc-underline hover:plc-no-underline",
19554
+ onClick: () => switchView("login")
19555
+ }, "Login to continue"));
19556
+ } else {
19557
+ errorContent = getErrorMessages(err);
19558
+ }
19559
+ dispatch({
19560
+ type: SHOW_ALERT,
19561
+ payload: {
19562
+ type: "error",
19563
+ content: errorContent
19564
+ }
19565
+ });
19566
+ dispatch({
19567
+ type: DISABLE_SUBMIT,
19568
+ payload: false
19569
+ });
19570
+ dispatch({
19571
+ type: LOADING,
19572
+ payload: false
19573
+ });
19574
+ onFailure(err);
19575
+ } else {
19576
+ callback();
19577
+ }
19578
+ });
19579
+ };
18668
19580
  const submitPayment = (state, dispatch) => {
18669
19581
  if (skipPayment && props !== null && props !== void 0 && props.freeOrders) {
18670
19582
  const isQuickPurchase = !Array.isArray(order);
@@ -18692,7 +19604,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18692
19604
  stripe.createSource({
18693
19605
  type: "card"
18694
19606
  }).then(_ref9 => {
18695
- var _ref10, _ref11, _state$updatedPrice2;
19607
+ var _ref10, _ref11, _state$updatedPrice;
18696
19608
  let {
18697
19609
  source,
18698
19610
  error
@@ -18715,7 +19627,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18715
19627
  return total + item.price * item.quantity;
18716
19628
  }, 0);
18717
19629
  };
18718
- (_ref10 = (_ref11 = (_state$updatedPrice2 = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice2 !== void 0 ? _state$updatedPrice2 : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref11 !== void 0 ? _ref11 : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref10 !== void 0 ? _ref10 : getOrderItemsTotal();
19630
+ (_ref10 = (_ref11 = (_state$updatedPrice = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref11 !== void 0 ? _ref11 : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref10 !== void 0 ? _ref10 : getOrderItemsTotal();
18719
19631
  return handlePayment(source);
18720
19632
  }).catch(error => {
18721
19633
  return handlePaymentError(error);
@@ -18926,25 +19838,47 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18926
19838
  return submitPayment(state);
18927
19839
  }
18928
19840
  if (getSiteCardProcessor() === "vantiv") {
18929
- return submitUsingVantiv(state);
19841
+ if (!isAuthenticated() && plan.type === "donation") {
19842
+ return sendRegisterRequest(state, () => submitUsingVantiv(state));
19843
+ } else {
19844
+ return submitUsingVantiv(state);
19845
+ }
18930
19846
  }
18931
19847
  if (getSiteCardProcessor() === "tap") {
18932
- return submitUsingTap(state);
19848
+ if (!isAuthenticated() && plan.type === "donation") {
19849
+ return sendRegisterRequest(state, () => submitUsingTap(state));
19850
+ } else {
19851
+ return submitUsingTap(state);
19852
+ }
19853
+ }
19854
+ if (getSiteCardProcessor() === "cybersource") {
19855
+ return submitUsingCybersource(state, dispatch);
18933
19856
  }
18934
19857
  if (getSiteCardProcessor() === "cybersource") {
18935
19858
  return submitUsingCybersource(state, dispatch);
18936
19859
  }
18937
19860
  if (selectedPaymentMethodId) {
18938
- // pay with selected method (source) if exists already
18939
- return handlePayment({
18940
- id: selectedPaymentMethodId,
18941
- isExistingSource: true
18942
- });
19861
+ if (!isAuthenticated() && plan.type === "donation") {
19862
+ return sendRegisterRequest(state, () => handlePayment({
19863
+ id: selectedPaymentMethodId,
19864
+ isExistingSource: true
19865
+ }));
19866
+ } else {
19867
+ // pay with selected method (source) if exists already
19868
+ return handlePayment({
19869
+ id: selectedPaymentMethodId,
19870
+ isExistingSource: true
19871
+ });
19872
+ }
18943
19873
  }
18944
19874
  if (type === "updatePaymentSource") {
18945
19875
  return updatePaymentSource(state, dispatch);
18946
19876
  }
18947
- submitPayment(state);
19877
+ if (!isAuthenticated() && plan.type === "donation") {
19878
+ return sendRegisterRequest(state, () => submitPayment(state));
19879
+ } else {
19880
+ return submitPayment(state);
19881
+ }
18948
19882
  });
18949
19883
  case HANDLE_PAYPAL_SUBSCRIPTION:
18950
19884
  return lib_5(state, (state, dispatch) => {
@@ -19029,6 +19963,18 @@ const PaymentMethodContainerWithoutStripe = _ref => {
19029
19963
  phone: action.payload,
19030
19964
  phoneError: null
19031
19965
  });
19966
+ case SET_EMAIL:
19967
+ return lib_7({
19968
+ ...state,
19969
+ email: action.payload,
19970
+ emailError: null
19971
+ });
19972
+ case SET_PASSWORD:
19973
+ return lib_7({
19974
+ ...state,
19975
+ password: action.payload,
19976
+ passwordError: null
19977
+ });
19032
19978
  case SET_FIRST_NAME_ERROR:
19033
19979
  return lib_7({
19034
19980
  ...state,
@@ -19047,6 +19993,18 @@ const PaymentMethodContainerWithoutStripe = _ref => {
19047
19993
  phoneError: action.payload,
19048
19994
  phone: null
19049
19995
  });
19996
+ case SET_EMAIL_ERROR:
19997
+ return lib_7({
19998
+ ...state,
19999
+ emailError: action.payload,
20000
+ email: ""
20001
+ });
20002
+ case SET_PASSWORD_ERROR:
20003
+ return lib_7({
20004
+ ...state,
20005
+ passwordError: action.payload,
20006
+ password: ""
20007
+ });
19050
20008
  case SHOW_ALERT:
19051
20009
  return lib_7({
19052
20010
  ...state,
@@ -19085,18 +20043,14 @@ const PaymentMethodContainerWithoutStripe = _ref => {
19085
20043
  const UnwrappedForm = es_12(PaymentMethodContainerWithoutStripe);
19086
20044
  const PaymentMethodContainer = props => {
19087
20045
  const [isStripeLoaded, setIsStripeLoaded] = React.useState(Boolean(window.Stripe));
19088
- const {
19089
- whenUserReady
19090
- } = usePelcro.getStore();
20046
+ usePelcro.getStore();
19091
20047
  const cardProcessor = getSiteCardProcessor();
19092
20048
  React.useEffect(() => {
19093
- whenUserReady(() => {
19094
- if (!window.Stripe && cardProcessor === "stripe") {
19095
- document.querySelector('script[src="https://js.stripe.com/v3"]').addEventListener("load", () => {
19096
- setIsStripeLoaded(true);
19097
- });
19098
- }
19099
- });
20049
+ if (!window.Stripe && cardProcessor === "stripe") {
20050
+ document.querySelector('script[src="https://js.stripe.com/v3"]').addEventListener("load", () => {
20051
+ setIsStripeLoaded(true);
20052
+ });
20053
+ }
19100
20054
  }, []);
19101
20055
  if (isStripeLoaded) {
19102
20056
  return /*#__PURE__*/React__default['default'].createElement(es_13, {
@@ -19389,13 +20343,15 @@ const DiscountedPrice = props => {
19389
20343
  };
19390
20344
 
19391
20345
  const SubmitPaymentMethod = _ref => {
19392
- var _plan$quantity, _window$Pelcro$site$r, _window$Pelcro$site$r2;
20346
+ var _plan$quantity, _plan$quantity2, _plan$quantity3, _window$Pelcro$site$r, _window$Pelcro$site$r2;
19393
20347
  let {
19394
20348
  onClick,
19395
20349
  ...otherProps
19396
20350
  } = _ref;
19397
20351
  const {
19398
20352
  plan,
20353
+ selectedDonationAmount,
20354
+ customDonationAmount,
19399
20355
  selectedPaymentMethodId
19400
20356
  } = usePelcro();
19401
20357
  const {
@@ -19407,6 +20363,8 @@ const SubmitPaymentMethod = _ref => {
19407
20363
  firstNameError,
19408
20364
  lastNameError,
19409
20365
  phoneError,
20366
+ emailError,
20367
+ passwordError,
19410
20368
  firstName,
19411
20369
  lastName,
19412
20370
  phone,
@@ -19419,7 +20377,7 @@ const SubmitPaymentMethod = _ref => {
19419
20377
  } = React.useContext(store$k);
19420
20378
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
19421
20379
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
19422
- const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
20380
+ const priceFormatted = (plan === null || plan === void 0 ? void 0 : plan.type) === "donation" && (selectedDonationAmount || customDonationAmount) ? getFormattedPriceByLocal(selectedDonationAmount ? selectedDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity2 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity2 !== void 0 ? _plan$quantity2 : 1) : customDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity3 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity3 !== void 0 ? _plan$quantity3 : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage()) : getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
19423
20381
  const supportsTap = Boolean((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tap_gateway_settings);
19424
20382
  const supportsCybersource = Boolean((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.cybersource_gateway_settings);
19425
20383
  const isUserFirstName = Boolean(window.Pelcro.user.read().first_name);
@@ -19430,9 +20388,9 @@ const SubmitPaymentMethod = _ref => {
19430
20388
  if (supportsTap && isUserFirstName && isUserLastName && isUserPhone) {
19431
20389
  setDisabled(disableSubmit);
19432
20390
  } else {
19433
- setDisabled(disableSubmit || supportsTap && firstNameError || supportsTap && lastNameError || supportsTap && phoneError || supportsTap && !(firstName !== null && firstName !== void 0 && firstName.length) || supportsTap && !(lastName !== null && lastName !== void 0 && lastName.length) || supportsTap && !(phone !== null && phone !== void 0 && phone.length) || supportsCybersource && !selectedPaymentMethodId && !(month !== null && month !== void 0 && month.length) || supportsCybersource && !selectedPaymentMethodId && !(year !== null && year !== void 0 && year.length));
20391
+ setDisabled(disableSubmit || supportsTap && firstNameError || supportsTap && lastNameError || supportsTap && phoneError || supportsTap && !(firstName !== null && firstName !== void 0 && firstName.length) || supportsTap && !(lastName !== null && lastName !== void 0 && lastName.length) || supportsTap && !(phone !== null && phone !== void 0 && phone.length) || emailError || passwordError || supportsCybersource && !selectedPaymentMethodId && !(month !== null && month !== void 0 && month.length) || supportsCybersource && !selectedPaymentMethodId && !(year !== null && year !== void 0 && year.length));
19434
20392
  }
19435
- }, [disableSubmit, firstNameError, lastNameError, phoneError, firstName, lastName, phone, month, year]);
20393
+ }, [disableSubmit, firstNameError, lastNameError, phoneError, firstName, lastName, phone, emailError, passwordError, month, year]);
19436
20394
  return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
19437
20395
  role: "submit",
19438
20396
  className: "plc-w-full plc-py-3",
@@ -20067,6 +21025,10 @@ const OrderCreateFreeButton = _ref => {
20067
21025
  }, otherProps), t("labels.submit"));
20068
21026
  };
20069
21027
 
21028
+ const DonationEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
21029
+ store: store$k
21030
+ }, props));
21031
+
20070
21032
  /**
20071
21033
  *
20072
21034
  */
@@ -20086,6 +21048,10 @@ function PaymentMethodView(_ref) {
20086
21048
  const {
20087
21049
  t
20088
21050
  } = useTranslation("checkoutForm");
21051
+ const {
21052
+ plan,
21053
+ isAuthenticated
21054
+ } = usePelcro();
20089
21055
  const cardProcessor = getSiteCardProcessor();
20090
21056
  const supportsVantiv = Boolean((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_gateway_settings);
20091
21057
  const supportsTap = Boolean((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.tap_gateway_settings);
@@ -20143,6 +21109,12 @@ function PaymentMethodView(_ref) {
20143
21109
  errorId: "pelcro-input-phone-error",
20144
21110
  label: t("labels.phone"),
20145
21111
  required: true
21112
+ })), !isAuthenticated() && (plan === null || plan === void 0 ? void 0 : plan.type) === "donation" && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(DonationEmail, {
21113
+ id: "pelcro-input-email",
21114
+ errorId: "pelcro-input-email-error",
21115
+ label: t("labels.email"),
21116
+ required: true,
21117
+ autoFocus: true
20146
21118
  })), /*#__PURE__*/React__default['default'].createElement(CheckoutForm, null), showCoupon && /*#__PURE__*/React__default['default'].createElement("div", {
20147
21119
  className: "plc-mb-2"
20148
21120
  }, /*#__PURE__*/React__default['default'].createElement(CouponCode, null), /*#__PURE__*/React__default['default'].createElement(DiscountedPrice, null)), /*#__PURE__*/React__default['default'].createElement(TaxAmount, null), /*#__PURE__*/React__default['default'].createElement("div", {
@@ -20462,7 +21434,7 @@ const SubscriptionCancelNowButton = _ref => {
20462
21434
  switchView(null);
20463
21435
 
20464
21436
  //Show confirmation alert after closing the modal
20465
- notify$1.confirm((onSuccess, onFailure) => {
21437
+ notify.confirm((onSuccess, onFailure) => {
20466
21438
  cancelSubscription(payload, onSuccess, onFailure);
20467
21439
  }, {
20468
21440
  confirmMessage: t("messages.subCancellation.isSureToCancelNow"),
@@ -20534,7 +21506,7 @@ const SubscriptionCancelLaterButton = _ref => {
20534
21506
  switchView(null);
20535
21507
 
20536
21508
  //Show confirmation alert after closing the modal
20537
- notify$1.confirm((onSuccess, onFailure) => {
21509
+ notify.confirm((onSuccess, onFailure) => {
20538
21510
  cancelSubscription(payload, onSuccess, onFailure);
20539
21511
  }, {
20540
21512
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
@@ -20771,7 +21743,7 @@ const SubscriptionSuspendButton = _ref => {
20771
21743
  switchView(null);
20772
21744
 
20773
21745
  //Show confirmation alert after closing the modal
20774
- notify$1.confirm((onSuccess, onFailure) => {
21746
+ notify.confirm((onSuccess, onFailure) => {
20775
21747
  suspendSubscription(payload, onSuccess, onFailure);
20776
21748
  }, {
20777
21749
  confirmMessage: t("messages.subCancellation.isSureToSuspendNow"),
@@ -21491,12 +22463,14 @@ const SubscriptionCreateView = _ref => {
21491
22463
  } = useTranslation("checkoutForm");
21492
22464
  const {
21493
22465
  product,
21494
- plan
22466
+ plan,
22467
+ selectedDonationAmount,
22468
+ customDonationAmount
21495
22469
  } = usePelcro();
21496
22470
  const skipPayment = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.skipPaymentForFreePlans;
21497
22471
  const showSubscriptionButton = skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0;
21498
22472
  const getPricingText = plan => {
21499
- var _plan$quantity;
22473
+ var _plan$quantity, _plan$quantity2, _plan$quantity3;
21500
22474
  const autoRenewed = plan.auto_renew;
21501
22475
  const {
21502
22476
  interval,
@@ -21506,7 +22480,7 @@ const SubscriptionCreateView = _ref => {
21506
22480
  interval,
21507
22481
  count: interval_count
21508
22482
  });
21509
- const priceFormatted = getFormattedPriceByLocal((plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
22483
+ const priceFormatted = plan.type === "donation" && (selectedDonationAmount || customDonationAmount) ? getFormattedPriceByLocal(selectedDonationAmount ? selectedDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1) : customDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity2 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity2 !== void 0 ? _plan$quantity2 : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage()) : getFormattedPriceByLocal((plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity3 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity3 !== void 0 ? _plan$quantity3 : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
21510
22484
  return /*#__PURE__*/React__default['default'].createElement("p", {
21511
22485
  className: "plc-text-gray-600"
21512
22486
  }, /*#__PURE__*/React__default['default'].createElement("span", {
@@ -21971,7 +22945,7 @@ function SubscriptionManageMembersView(props) {
21971
22945
  className: "plc-font-semibold plc-text-center plc-text-gray-900 pelcro-title-wrapper"
21972
22946
  }, /*#__PURE__*/React__default['default'].createElement("h4", {
21973
22947
  className: "plc-text-2xl"
21974
- }, t("labels.inviteMembers")), /*#__PURE__*/React__default['default'].createElement("p", null, "Comma-separated list e.g. 'john@example.com,jane@example.com'")), /*#__PURE__*/React__default['default'].createElement("form", {
22948
+ }, t("labels.inviteMembers")), /*#__PURE__*/React__default['default'].createElement("p", null, t("labels.listNote"), " 'john@example.com,jane@example.com'")), /*#__PURE__*/React__default['default'].createElement("form", {
21975
22949
  action: "javascript:void(0);",
21976
22950
  className: "plc-mt-2 pelcro-form"
21977
22951
  }, /*#__PURE__*/React__default['default'].createElement(SubscriptionManageMembersContainer, props, /*#__PURE__*/React__default['default'].createElement(AlertWithContext, null), /*#__PURE__*/React__default['default'].createElement(SubscriptionManageMembersEmails, {
@@ -22829,7 +23803,7 @@ const AddressCreateContainer = _ref => {
22829
23803
  });
22830
23804
  return onFailure(err);
22831
23805
  }
22832
- notify$1.success(t("messages.addressUpdated"));
23806
+ notify.success(t("messages.addressUpdated"));
22833
23807
  return onMembershipAdressUpdateSuccess(res);
22834
23808
  });
22835
23809
  }
@@ -23228,6 +24202,7 @@ function CountrySelect(_ref) {
23228
24202
  return /*#__PURE__*/React__default['default'].createElement(Loader, null);
23229
24203
  }
23230
24204
  return /*#__PURE__*/React__default['default'].createElement(Select, Object.assign({
24205
+ className: "plc-pr-8",
23231
24206
  value: country,
23232
24207
  error: countryError,
23233
24208
  onChange: e => handleInputChange(e.target.value),
@@ -23310,6 +24285,7 @@ function StateSelect(_ref) {
23310
24285
  return /*#__PURE__*/React__default['default'].createElement(Loader, null);
23311
24286
  }
23312
24287
  return /*#__PURE__*/React__default['default'].createElement(Select, Object.assign({
24288
+ className: "plc-pr-8",
23313
24289
  value: state,
23314
24290
  error: stateError,
23315
24291
  onChange: e => handleInputChange(e.target.value),
@@ -26318,7 +27294,7 @@ const AddressSelectContainer = _ref => {
26318
27294
  });
26319
27295
  return onFailure(err);
26320
27296
  }
26321
- notify$1.success(t("messages.addressUpdated"));
27297
+ notify.success(t("messages.addressUpdated"));
26322
27298
  return onMembershipAdressUpdateSuccess(res);
26323
27299
  });
26324
27300
  }
@@ -28279,7 +29255,7 @@ const SubscriptionsItems = _ref => {
28279
29255
  return switchView("email-verify");
28280
29256
  }
28281
29257
  onClose === null || onClose === void 0 ? void 0 : onClose();
28282
- notify$1.confirm((onSuccess, onFailure) => {
29258
+ notify.confirm((onSuccess, onFailure) => {
28283
29259
  cancelSubscription(sub.id, onSuccess, onFailure);
28284
29260
  }, {
28285
29261
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
@@ -28296,7 +29272,7 @@ const SubscriptionsItems = _ref => {
28296
29272
  if (userMustVerifyEmail()) {
28297
29273
  return switchView("email-verify");
28298
29274
  }
28299
- reactivateSubscription(sub.id);
29275
+ reactivateSubscription(sub.id, false);
28300
29276
  };
28301
29277
 
28302
29278
  // Renew click
@@ -28334,7 +29310,7 @@ const SubscriptionsItems = _ref => {
28334
29310
  return switchView("email-verify");
28335
29311
  }
28336
29312
  onClose === null || onClose === void 0 ? void 0 : onClose();
28337
- notify$1.confirm((onSuccess, onFailure) => {
29313
+ notify.confirm((onSuccess, onFailure) => {
28338
29314
  unSuspendSubscription(sub.id, onSuccess, onFailure);
28339
29315
  }, {
28340
29316
  confirmMessage: t("messages.subUnSuspend.isSureToUnSuspend"),
@@ -28416,7 +29392,7 @@ const SubscriptionsItems = _ref => {
28416
29392
  onClick: onCancelClick,
28417
29393
  disabled: disableSubmit,
28418
29394
  "data-key": sub.id
28419
- }, t("labels.unsubscribe")) : "", (sub === null || sub === void 0 ? void 0 : (_sub$plan = sub.plan) === null || _sub$plan === void 0 ? void 0 : _sub$plan.type) === 'membership' && /*#__PURE__*/React__default['default'].createElement(Button, {
29395
+ }, t("labels.unsubscribe")) : "", (sub === null || sub === void 0 ? void 0 : (_sub$plan = sub.plan) === null || _sub$plan === void 0 ? void 0 : _sub$plan.type) === "membership" && /*#__PURE__*/React__default['default'].createElement(Button, {
28420
29396
  variant: "ghost",
28421
29397
  className: "plc-text-blue-400 pelcro-dashboard-sub-manage-members-button",
28422
29398
  icon: /*#__PURE__*/React__default['default'].createElement(SvgRefresh, null),
@@ -28463,7 +29439,10 @@ const SubscriptionsItems = _ref => {
28463
29439
  };
28464
29440
  function getNonDonationSubs() {
28465
29441
  var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
28466
- return (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => !sub.plan.is_donation)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
29442
+ return (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => {
29443
+ var _sub$plan2;
29444
+ return ((_sub$plan2 = sub.plan) === null || _sub$plan2 === void 0 ? void 0 : _sub$plan2.type) !== "donation";
29445
+ })) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
28467
29446
  }
28468
29447
  function isDateAfterToday(date) {
28469
29448
  const today = new Date().setHours(0, 0, 0, 0);
@@ -28751,6 +29730,7 @@ function SvgQrcode(props) {
28751
29730
 
28752
29731
  const DonationsMenu = _ref => {
28753
29732
  let {
29733
+ onClose,
28754
29734
  reactivateSubscription,
28755
29735
  disableSubmit,
28756
29736
  cancelSubscription
@@ -28762,10 +29742,10 @@ const DonationsMenu = _ref => {
28762
29742
  switchView,
28763
29743
  setSubscriptionToCancel
28764
29744
  } = usePelcro();
28765
- const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
29745
+ const donations = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
29746
+ console.log("Sub", sub);
28766
29747
  // Cancel button click handlers
28767
29748
  const onCancelClick = () => {
28768
- var _onClose;
28769
29749
  const isImmediateCancelationEnabled = window.Pelcro.site.read().cancel_settings.status;
28770
29750
  if (isImmediateCancelationEnabled) {
28771
29751
  setSubscriptionToCancel(sub.id);
@@ -28774,16 +29754,16 @@ const DonationsMenu = _ref => {
28774
29754
  if (userMustVerifyEmail()) {
28775
29755
  return switchView("email-verify");
28776
29756
  }
28777
- (_onClose = onClose) === null || _onClose === void 0 ? void 0 : _onClose();
29757
+ onClose === null || onClose === void 0 ? void 0 : onClose();
28778
29758
  notify.confirm((onSuccess, onFailure) => {
28779
29759
  cancelSubscription(sub.id, onSuccess, onFailure);
28780
29760
  }, {
28781
- confirmMessage: t("messages.subCancellation.isSureToCancel"),
28782
- loadingMessage: t("messages.subCancellation.loading"),
28783
- successMessage: t("messages.subCancellation.success"),
28784
- errorMessage: t("messages.subCancellation.error")
29761
+ confirmMessage: t("messages.donationCancellation.isSureToCancel"),
29762
+ loadingMessage: t("messages.donationCancellation.loading"),
29763
+ successMessage: t("messages.donationCancellation.success"),
29764
+ errorMessage: t("messages.donationCancellation.error")
28785
29765
  }, {
28786
- closeButtonLabel: t("labels.subCancellation.goBack")
29766
+ closeButtonLabel: t("labels.donationCancellation.goBack")
28787
29767
  });
28788
29768
  };
28789
29769
 
@@ -28792,7 +29772,7 @@ const DonationsMenu = _ref => {
28792
29772
  if (userMustVerifyEmail()) {
28793
29773
  return switchView("email-verify");
28794
29774
  }
28795
- reactivateSubscription(sub.id);
29775
+ reactivateSubscription(sub.id, true);
28796
29776
  };
28797
29777
  return /*#__PURE__*/React__default['default'].createElement("tr", {
28798
29778
  key: sub.id,
@@ -28833,12 +29813,18 @@ const DonationsMenu = _ref => {
28833
29813
  className: "plc-w-3/12 "
28834
29814
  }, t("labels.actions")))), /*#__PURE__*/React__default['default'].createElement("tbody", null, /*#__PURE__*/React__default['default'].createElement("tr", {
28835
29815
  className: "plc-h-4"
28836
- }), subscriptions));
29816
+ }), donations));
28837
29817
  };
28838
29818
  function getDonationSubs() {
28839
29819
  var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r, _window$Pelcro$user$r2;
28840
- const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
28841
- const canceledDonations = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
29820
+ const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => {
29821
+ var _sub$plan;
29822
+ return ((_sub$plan = sub.plan) === null || _sub$plan === void 0 ? void 0 : _sub$plan.type) === "donation";
29823
+ })) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
29824
+ const canceledDonations = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.filter(sub => {
29825
+ var _sub$plan2;
29826
+ return ((_sub$plan2 = sub.plan) === null || _sub$plan2 === void 0 ? void 0 : _sub$plan2.type) === "donation";
29827
+ })) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
28842
29828
  return [...donations, ...canceledDonations];
28843
29829
  }
28844
29830
  function formatStartDate(date) {
@@ -29229,7 +30215,7 @@ class Dashboard extends React.Component {
29229
30215
  const formattedRenewDate = new Intl.DateTimeFormat("en-CA").format(renewDate);
29230
30216
  return `${this.locale("labels.renewsOn")} ${formattedRenewDate}`;
29231
30217
  });
29232
- _defineProperty$3(this, "reactivateSubscription", subscription_id => {
30218
+ _defineProperty$3(this, "reactivateSubscription", (subscription_id, isDonation) => {
29233
30219
  // disable the Login button to prevent repeated clicks
29234
30220
  this.setState({
29235
30221
  disableSubmit: true
@@ -29243,9 +30229,17 @@ class Dashboard extends React.Component {
29243
30229
  });
29244
30230
  this.props.onClose();
29245
30231
  if (err) {
29246
- return notify$1.error(this.locale("messages.subReactivation.error"));
30232
+ if (isDonation) {
30233
+ return notify.error(this.locale("messages.donationReactivation.error"));
30234
+ } else {
30235
+ return notify.error(this.locale("messages.subReactivation.error"));
30236
+ }
30237
+ }
30238
+ if (isDonation) {
30239
+ return notify.success(this.locale("messages.donationReactivation.success"));
30240
+ } else {
30241
+ return notify.success(this.locale("messages.subReactivation.success"));
29247
30242
  }
29248
- return notify$1.success(this.locale("messages.subReactivation.success"));
29249
30243
  });
29250
30244
  });
29251
30245
  _defineProperty$3(this, "getSubscriptionStatus", sub => {
@@ -29607,6 +30601,7 @@ class Dashboard extends React.Component {
29607
30601
  }),
29608
30602
  title: this.locale("labels.donations"),
29609
30603
  content: /*#__PURE__*/React__default['default'].createElement(DonationsMenu, {
30604
+ onClose: this.props.onClose,
29610
30605
  reactivateSubscription: this.reactivateSubscription,
29611
30606
  disableSubmit: this.state.disableSubmit,
29612
30607
  cancelSubscription: this.cancelSubscription
@@ -29648,8 +30643,14 @@ function hasInvoices() {
29648
30643
  }
29649
30644
  function hasDonationSubs() {
29650
30645
  var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
29651
- const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
29652
- const canceledDonations = (_window$Pelcro$user$r4 = (_window$Pelcro$user$r5 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r5 === void 0 ? void 0 : _window$Pelcro$user$r5.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$user$r4 !== void 0 ? _window$Pelcro$user$r4 : [];
30646
+ const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => {
30647
+ var _sub$plan;
30648
+ return ((_sub$plan = sub.plan) === null || _sub$plan === void 0 ? void 0 : _sub$plan.type) === "donation";
30649
+ })) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
30650
+ const canceledDonations = (_window$Pelcro$user$r4 = (_window$Pelcro$user$r5 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r5 === void 0 ? void 0 : _window$Pelcro$user$r5.filter(sub => {
30651
+ var _sub$plan2;
30652
+ return ((_sub$plan2 = sub.plan) === null || _sub$plan2 === void 0 ? void 0 : _sub$plan2.type) === "donation";
30653
+ })) !== null && _window$Pelcro$user$r4 !== void 0 ? _window$Pelcro$user$r4 : [];
29653
30654
  return donations.length > 0 || canceledDonations.length > 0;
29654
30655
  }
29655
30656
  function hasActiveMemberships() {
@@ -31814,7 +32815,7 @@ function VerifyLinkTokenModal(_ref) {
31814
32815
  var _props$onSuccess;
31815
32816
  (_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
31816
32817
  resetView();
31817
- notify$1.success(t("messages.success"));
32818
+ notify.success(t("messages.success"));
31818
32819
  };
31819
32820
  return /*#__PURE__*/React__default['default'].createElement(Modal, {
31820
32821
  id: "pelcro-login-modal",
@@ -33528,6 +34529,7 @@ exports.Dashboard = DashboardWithHook;
33528
34529
  exports.DashboardOpenButton = DashboardOpenButton;
33529
34530
  exports.DatePicker = DatePicker;
33530
34531
  exports.DiscountedPrice = DiscountedPrice;
34532
+ exports.DonationModal = DonationModalWithHook;
33531
34533
  exports.Email = Email;
33532
34534
  exports.EmailVerifyContainer = EmailVerifyContainer;
33533
34535
  exports.EmailVerifyModal = EmailVerifyModal;
@@ -33705,6 +34707,6 @@ exports.i18n = i18next;
33705
34707
  exports.initButtons = init$1;
33706
34708
  exports.initContentEntitlement = init;
33707
34709
  exports.invoicePaymentSubmitButton = invoicePaymentSubmitButton;
33708
- exports.notify = notify$1;
34710
+ exports.notify = notify;
33709
34711
  exports.unauthenticatedButtons = unauthenticatedButtons;
33710
34712
  exports.usePelcro = usePelcro;