@pelcro/react-pelcro-js 3.0.0 → 3.1.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.esm.js CHANGED
@@ -3216,7 +3216,7 @@ var validation$1 = {
3216
3216
  enterEmail: "Un courriel est requis.",
3217
3217
  enterPassword: "Mot de passe requis."
3218
3218
  };
3219
- var buttons$7 = {
3219
+ var buttons$9 = {
3220
3220
  account: "Accès abonné(e)s",
3221
3221
  login: "Se connecter"
3222
3222
  };
@@ -3293,7 +3293,7 @@ var confirm$5 = {
3293
3293
  };
3294
3294
  var common_fr = {
3295
3295
  validation: validation$1,
3296
- buttons: buttons$7,
3296
+ buttons: buttons$9,
3297
3297
  dashboard: dashboard$1,
3298
3298
  select: select$3,
3299
3299
  confirm: confirm$5
@@ -3304,7 +3304,7 @@ var validation = {
3304
3304
  enterEmail: "Email address is required.",
3305
3305
  enterPassword: "Password is required."
3306
3306
  };
3307
- var buttons$6 = {
3307
+ var buttons$8 = {
3308
3308
  account: "My account",
3309
3309
  login: "Login"
3310
3310
  };
@@ -3381,7 +3381,7 @@ var confirm$4 = {
3381
3381
  };
3382
3382
  var common_en = {
3383
3383
  validation: validation,
3384
- buttons: buttons$6,
3384
+ buttons: buttons$8,
3385
3385
  dashboard: dashboard,
3386
3386
  select: select$2,
3387
3387
  confirm: confirm$4
@@ -3431,10 +3431,10 @@ var paymentMethod_fr = {
3431
3431
  select: select
3432
3432
  };
3433
3433
 
3434
- var title$d = "Enter your email to subscribe to our newsletter";
3434
+ var title$f = "Enter your email to subscribe to our newsletter";
3435
3435
  var updateTitle$1 = "Update newsletter selections";
3436
3436
  var subtitle$7 = "We may use your email for other marketing communication";
3437
- var labels$n = {
3437
+ var labels$p = {
3438
3438
  submit: "Submit",
3439
3439
  firstName: "First name",
3440
3440
  lastName: "Last name",
@@ -3450,17 +3450,17 @@ var messages$r = {
3450
3450
  here: "here"
3451
3451
  };
3452
3452
  var newsletter_en = {
3453
- title: title$d,
3453
+ title: title$f,
3454
3454
  updateTitle: updateTitle$1,
3455
3455
  subtitle: subtitle$7,
3456
- labels: labels$n,
3456
+ labels: labels$p,
3457
3457
  messages: messages$r
3458
3458
  };
3459
3459
 
3460
- var title$c = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3460
+ var title$e = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3461
3461
  var updateTitle = "Mettre à jour son choix d'infolettres";
3462
3462
  var subtitle$6 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3463
- var labels$m = {
3463
+ var labels$o = {
3464
3464
  submit: "Lire l’article !",
3465
3465
  firstName: "Prénom",
3466
3466
  lastName: "Nom de famille",
@@ -3476,14 +3476,14 @@ var messages$q = {
3476
3476
  here: "ici"
3477
3477
  };
3478
3478
  var newsletter_fr = {
3479
- title: title$c,
3479
+ title: title$e,
3480
3480
  updateTitle: updateTitle,
3481
3481
  subtitle: subtitle$6,
3482
- labels: labels$m,
3482
+ labels: labels$o,
3483
3483
  messages: messages$q
3484
3484
  };
3485
3485
 
3486
- var labels$l = {
3486
+ var labels$n = {
3487
3487
  "continue": "Continue to content"
3488
3488
  };
3489
3489
  var messages$p = {
@@ -3502,18 +3502,22 @@ var messages$p = {
3502
3502
  giftRedeem: {
3503
3503
  title: "Congratulations",
3504
3504
  content: "You have successfully redeemed your gift subscription. Enjoy!"
3505
+ },
3506
+ invoicePayment: {
3507
+ title: "Invoice paid successfully",
3508
+ content: "Please contact us if you have any questions or concerns."
3505
3509
  }
3506
3510
  };
3507
3511
  var errors$9 = {
3508
3512
  "": ""
3509
3513
  };
3510
3514
  var success_en = {
3511
- labels: labels$l,
3515
+ labels: labels$n,
3512
3516
  messages: messages$p,
3513
3517
  errors: errors$9
3514
3518
  };
3515
3519
 
3516
- var labels$k = {
3520
+ var labels$m = {
3517
3521
  "continue": "Abonnement réussi !"
3518
3522
  };
3519
3523
  var messages$o = {
@@ -3532,13 +3536,17 @@ var messages$o = {
3532
3536
  giftRedeem: {
3533
3537
  title: "Félicitations",
3534
3538
  content: "Vous avez validé votre abonnement cadeau. Profitez-en!"
3539
+ },
3540
+ invoicePayment: {
3541
+ title: "Invoice paid successfully",
3542
+ content: "Please contact us if you have any questions or concerns."
3535
3543
  }
3536
3544
  };
3537
3545
  var errors$8 = {
3538
3546
  "": ""
3539
3547
  };
3540
3548
  var success_fr = {
3541
- labels: labels$k,
3549
+ labels: labels$m,
3542
3550
  messages: messages$o,
3543
3551
  errors: errors$8
3544
3552
  };
@@ -3575,7 +3583,7 @@ var messages$l = {
3575
3583
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
3576
3584
  bankRedirection: "Please hold, redirecting you to your bank."
3577
3585
  };
3578
- var labels$j = {
3586
+ var labels$l = {
3579
3587
  card: "Enter card number",
3580
3588
  date: "Expiration date",
3581
3589
  CVC: "CVC",
@@ -3595,14 +3603,14 @@ var labels$j = {
3595
3603
  };
3596
3604
  var checkoutForm_en = {
3597
3605
  messages: messages$l,
3598
- labels: labels$j
3606
+ labels: labels$l
3599
3607
  };
3600
3608
 
3601
3609
  var messages$k = {
3602
3610
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
3603
3611
  bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque."
3604
3612
  };
3605
- var labels$i = {
3613
+ var labels$k = {
3606
3614
  card: "Entrez le numéro de carte",
3607
3615
  date: "Date d’expiration",
3608
3616
  CVC: "CVC",
@@ -3622,7 +3630,7 @@ var labels$i = {
3622
3630
  };
3623
3631
  var checkoutForm_fr = {
3624
3632
  messages: messages$k,
3625
- labels: labels$i
3633
+ labels: labels$k
3626
3634
  };
3627
3635
 
3628
3636
  var youAreSafe$1 = "You're safe - PCI compliant 128 SSL by";
@@ -3631,13 +3639,17 @@ var giftSent$1 = "Subscription gift has been sent to";
3631
3639
  var successfully$1 = "successfully";
3632
3640
  var entitlement$1 = "Some of the content on this page is available with one or more of our plans. <1>Subscribe</1> now to get full page access.";
3633
3641
  var recaptcha$1 = "This site is protected by reCAPTCHA and the Google <1>Privacy Policy</1> and <3>Terms of Service</3> apply.";
3642
+ var invalidInvoice$1 = "Invalid invoice ID, please contact support";
3643
+ var zeroTotalInvoice$1 = "You can't view an invoice of 0$";
3634
3644
  var messages_en = {
3635
3645
  youAreSafe: youAreSafe$1,
3636
3646
  cancel: cancel$1,
3637
3647
  giftSent: giftSent$1,
3638
3648
  successfully: successfully$1,
3639
3649
  entitlement: entitlement$1,
3640
- recaptcha: recaptcha$1
3650
+ recaptcha: recaptcha$1,
3651
+ invalidInvoice: invalidInvoice$1,
3652
+ zeroTotalInvoice: zeroTotalInvoice$1
3641
3653
  };
3642
3654
 
3643
3655
  var youAreSafe = "Vous êtes en sécurité - PCI conforme 128 SSL par";
@@ -3646,16 +3658,20 @@ var giftSent = "Le cadeau d’abonnement a été envoyé à";
3646
3658
  var successfully = "avec succès.";
3647
3659
  var entitlement = "Une partie du contenu de cette page est disponible sous un ou plusieurs de nos plans. <1>Abonnez-vous</1> à l'un de nos plans disponibles pour accéder à plus de contenu";
3648
3660
  var recaptcha = "Ce site est protégé par reCAPTCHA - les <1>règles de confidentialité</1> Google ainsi que les <3>conditions d'utilisation</3> s'appliquent.";
3661
+ var invalidInvoice = "Invalid invoice ID, please contact support";
3662
+ var zeroTotalInvoice = "You can't view an invoice of 0$";
3649
3663
  var messages_fr = {
3650
3664
  youAreSafe: youAreSafe,
3651
3665
  cancel: cancel,
3652
3666
  giftSent: giftSent,
3653
3667
  successfully: successfully,
3654
3668
  entitlement: entitlement,
3655
- recaptcha: recaptcha
3669
+ recaptcha: recaptcha,
3670
+ invalidInvoice: invalidInvoice,
3671
+ zeroTotalInvoice: zeroTotalInvoice
3656
3672
  };
3657
3673
 
3658
- var labels$h = {
3674
+ var labels$j = {
3659
3675
  email: "Enter email",
3660
3676
  password: "Enter password",
3661
3677
  required: "required",
@@ -3682,12 +3698,12 @@ var errors$5 = {
3682
3698
  "": ""
3683
3699
  };
3684
3700
  var login_en = {
3685
- labels: labels$h,
3701
+ labels: labels$j,
3686
3702
  messages: messages$j,
3687
3703
  errors: errors$5
3688
3704
  };
3689
3705
 
3690
- var labels$g = {
3706
+ var labels$i = {
3691
3707
  email: "Entrez votre adresse courriel",
3692
3708
  password: "Entrez votre mot de passe",
3693
3709
  required: "Champs obligatoires",
@@ -3714,14 +3730,14 @@ var errors$4 = {
3714
3730
  "": ""
3715
3731
  };
3716
3732
  var login_fr = {
3717
- labels: labels$g,
3733
+ labels: labels$i,
3718
3734
  messages: messages$i,
3719
3735
  errors: errors$4
3720
3736
  };
3721
3737
 
3722
- var title$b = "Create an account";
3738
+ var title$d = "Create an account";
3723
3739
  var subtitle$5 = "Enter your email and password below";
3724
- var labels$f = {
3740
+ var labels$h = {
3725
3741
  signUpFacebook: "Sign up with Facebook",
3726
3742
  signUpGoogle: "Sign up with Google",
3727
3743
  signUpEmail: "Sign up with Email",
@@ -3766,7 +3782,7 @@ var gift$1 = {
3766
3782
  lastName: "Last name",
3767
3783
  email: "Email",
3768
3784
  startDate: "Gift date",
3769
- giftMessage: "Gift message (200 characters max)",
3785
+ giftMessage: "Gift message ({{count}} characters remaining)",
3770
3786
  required: "required",
3771
3787
  firstNamePlaceholder: "First name",
3772
3788
  lastNamePlaceholder: "Last name",
@@ -3805,18 +3821,18 @@ var redeem$1 = {
3805
3821
  }
3806
3822
  };
3807
3823
  var register_en = {
3808
- title: title$b,
3824
+ title: title$d,
3809
3825
  subtitle: subtitle$5,
3810
- labels: labels$f,
3826
+ labels: labels$h,
3811
3827
  messages: messages$h,
3812
3828
  errors: errors$3,
3813
3829
  gift: gift$1,
3814
3830
  redeem: redeem$1
3815
3831
  };
3816
3832
 
3817
- var title$a = "Créer un compte";
3833
+ var title$c = "Créer un compte";
3818
3834
  var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
3819
- var labels$e = {
3835
+ var labels$g = {
3820
3836
  signUpFacebook: "Inscrivez-vous avec Facebook",
3821
3837
  signUpGoogle: "Inscrivez-vous avec Google",
3822
3838
  signUpEmail: "Inscrivez-vous avec votre courriel",
@@ -3862,7 +3878,7 @@ var gift = {
3862
3878
  lastName: "Nom de famille",
3863
3879
  email: "Adresse courriel",
3864
3880
  startDate: "Date de début",
3865
- giftMessage: "Message du cadeau (200 caractères max)",
3881
+ giftMessage: "Message du cadeau ({{count}} caractères restants)",
3866
3882
  required: "Champs obligatoires",
3867
3883
  firstNamePlaceholder: "Prénom",
3868
3884
  lastNamePlaceholder: "Nom de famille",
@@ -3901,16 +3917,16 @@ var redeem = {
3901
3917
  }
3902
3918
  };
3903
3919
  var register_fr = {
3904
- title: title$a,
3920
+ title: title$c,
3905
3921
  subtitle: subtitle$4,
3906
- labels: labels$e,
3922
+ labels: labels$g,
3907
3923
  messages: messages$g,
3908
3924
  errors: errors$2,
3909
3925
  gift: gift,
3910
3926
  redeem: redeem
3911
3927
  };
3912
3928
 
3913
- var labels$d = {
3929
+ var labels$f = {
3914
3930
  title: "Want to update your profile?",
3915
3931
  subtitle: "Enter your information below to update your profile",
3916
3932
  email: "Email",
@@ -3932,11 +3948,11 @@ var messages$f = {
3932
3948
  pictureUpdated: "Your profile picture was updated successfully."
3933
3949
  };
3934
3950
  var userEdit_en = {
3935
- labels: labels$d,
3951
+ labels: labels$f,
3936
3952
  messages: messages$f
3937
3953
  };
3938
3954
 
3939
- var labels$c = {
3955
+ var labels$e = {
3940
3956
  title: "Voulez-vous mettre à jour votre profil ?",
3941
3957
  subtitle: "Entrez vos informations ci-dessous pour mettre à jour votre profil",
3942
3958
  email: "Address courriel",
@@ -3958,14 +3974,14 @@ var messages$e = {
3958
3974
  pictureUpdated: "Votre photo de profil a été mise à jour avec succès."
3959
3975
  };
3960
3976
  var userEdit_fr = {
3961
- labels: labels$c,
3977
+ labels: labels$e,
3962
3978
  messages: messages$e
3963
3979
  };
3964
3980
 
3965
- var title$9 = "Enter your shipping address";
3981
+ var title$b = "Enter your shipping address";
3966
3982
  var selectAddressTitle$1 = "Please select an address";
3967
3983
  var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
3968
- var labels$b = {
3984
+ var labels$d = {
3969
3985
  address: "Address",
3970
3986
  code: "Postal Code/Zip",
3971
3987
  city: "City",
@@ -3975,7 +3991,7 @@ var labels$b = {
3975
3991
  lastName: "Last name",
3976
3992
  required: "required"
3977
3993
  };
3978
- var buttons$5 = {
3994
+ var buttons$7 = {
3979
3995
  submit: "Submit",
3980
3996
  selectAddress: "Select address",
3981
3997
  addAddress: "Add new address"
@@ -3985,18 +4001,18 @@ var messages$d = {
3985
4001
  subRedeemed: "Your subscription has been redeemed."
3986
4002
  };
3987
4003
  var address_en = {
3988
- title: title$9,
4004
+ title: title$b,
3989
4005
  selectAddressTitle: selectAddressTitle$1,
3990
4006
  selectAddressSubtitle: selectAddressSubtitle$1,
3991
- labels: labels$b,
3992
- buttons: buttons$5,
4007
+ labels: labels$d,
4008
+ buttons: buttons$7,
3993
4009
  messages: messages$d
3994
4010
  };
3995
4011
 
3996
- var title$8 = "Entrez votre adresse de livraison";
4012
+ var title$a = "Entrez votre adresse de livraison";
3997
4013
  var selectAddressTitle = "Veuillez sélectionner une adresse";
3998
4014
  var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
3999
- var labels$a = {
4015
+ var labels$c = {
4000
4016
  address: "Adresse",
4001
4017
  code: "Code postal / Zip",
4002
4018
  city: "Ville",
@@ -4006,7 +4022,7 @@ var labels$a = {
4006
4022
  lastName: "Nom de famille",
4007
4023
  required: "Champs obligatoires"
4008
4024
  };
4009
- var buttons$4 = {
4025
+ var buttons$6 = {
4010
4026
  submit: "Valider",
4011
4027
  selectAddress: "Choisir cette adresse",
4012
4028
  addAddress: "Ajouter une nouvelle adresse"
@@ -4016,15 +4032,15 @@ var messages$c = {
4016
4032
  subRedeemed: "Votre abonnement a bien été activé."
4017
4033
  };
4018
4034
  var address_fr = {
4019
- title: title$8,
4035
+ title: title$a,
4020
4036
  selectAddressTitle: selectAddressTitle,
4021
4037
  selectAddressSubtitle: selectAddressSubtitle,
4022
- labels: labels$a,
4023
- buttons: buttons$4,
4038
+ labels: labels$c,
4039
+ buttons: buttons$6,
4024
4040
  messages: messages$c
4025
4041
  };
4026
4042
 
4027
- var title$7 = "Reset your password";
4043
+ var title$9 = "Reset your password";
4028
4044
  var subtitle$3 = "Enter a new password below";
4029
4045
  var email$3 = "Email";
4030
4046
  var password$3 = "Password";
@@ -4033,7 +4049,7 @@ var submit$5 = "Submit";
4033
4049
  var required$5 = "Required";
4034
4050
  var passwordUpdated$1 = "Password has been updated, please login with the new password";
4035
4051
  var passwordReset_en = {
4036
- title: title$7,
4052
+ title: title$9,
4037
4053
  subtitle: subtitle$3,
4038
4054
  email: email$3,
4039
4055
  password: password$3,
@@ -4043,7 +4059,7 @@ var passwordReset_en = {
4043
4059
  passwordUpdated: passwordUpdated$1
4044
4060
  };
4045
4061
 
4046
- var title$6 = "Réinitialiser votre mot de passe";
4062
+ var title$8 = "Réinitialiser votre mot de passe";
4047
4063
  var subtitle$2 = "Entrez un nouveau mot de passe ci-dessous";
4048
4064
  var email$2 = "Adresse courriel";
4049
4065
  var password$2 = "Mot de passe";
@@ -4052,7 +4068,7 @@ var submit$4 = "Soumettre";
4052
4068
  var required$4 = "Champs obligatoires";
4053
4069
  var passwordUpdated = "Votre mot de passe a été mis à jour, veuillez vous connecter avec celui-ci";
4054
4070
  var passwordReset_fr = {
4055
- title: title$6,
4071
+ title: title$8,
4056
4072
  subtitle: subtitle$2,
4057
4073
  email: email$2,
4058
4074
  password: password$2,
@@ -4062,7 +4078,7 @@ var passwordReset_fr = {
4062
4078
  passwordUpdated: passwordUpdated
4063
4079
  };
4064
4080
 
4065
- var title$5 = "Forgot your password?";
4081
+ var title$7 = "Forgot your password?";
4066
4082
  var email$1 = "Email";
4067
4083
  var password$1 = "Password";
4068
4084
  var submit$3 = "Submit";
@@ -4073,7 +4089,7 @@ var messages$b = {
4073
4089
  loginHere: "login here."
4074
4090
  };
4075
4091
  var passwordForgot_en = {
4076
- title: title$5,
4092
+ title: title$7,
4077
4093
  email: email$1,
4078
4094
  password: password$1,
4079
4095
  submit: submit$3,
@@ -4082,7 +4098,7 @@ var passwordForgot_en = {
4082
4098
  messages: messages$b
4083
4099
  };
4084
4100
 
4085
- var title$4 = "Mot de passe oublié ?";
4101
+ var title$6 = "Mot de passe oublié ?";
4086
4102
  var email = "Courriel";
4087
4103
  var password = "Mot de passe";
4088
4104
  var submit$2 = "Soumettre";
@@ -4093,7 +4109,7 @@ var messages$a = {
4093
4109
  loginHere: "Connectez-vous ici"
4094
4110
  };
4095
4111
  var passwordForgot_fr = {
4096
- title: title$4,
4112
+ title: title$6,
4097
4113
  email: email,
4098
4114
  password: password,
4099
4115
  submit: submit$2,
@@ -4102,7 +4118,7 @@ var passwordForgot_fr = {
4102
4118
  messages: messages$a
4103
4119
  };
4104
4120
 
4105
- var title$3 = "Change your password";
4121
+ var title$5 = "Change your password";
4106
4122
  var currentPassword$1 = "Current password";
4107
4123
  var newPassword$1 = "New password";
4108
4124
  var confirmNewPassword$1 = "Confirm new password";
@@ -4112,7 +4128,7 @@ var passwordChanged$1 = "Password has been changed, please login with the new pa
4112
4128
  var passwordsNotMatching$1 = "Passwords don't match";
4113
4129
  var weakPassword$1 = "Your password must contain at least 6 characters";
4114
4130
  var passwordChange_en = {
4115
- title: title$3,
4131
+ title: title$5,
4116
4132
  currentPassword: currentPassword$1,
4117
4133
  newPassword: newPassword$1,
4118
4134
  confirmNewPassword: confirmNewPassword$1,
@@ -4123,7 +4139,7 @@ var passwordChange_en = {
4123
4139
  weakPassword: weakPassword$1
4124
4140
  };
4125
4141
 
4126
- var title$2 = "Changez votre mot de passe";
4142
+ var title$4 = "Changez votre mot de passe";
4127
4143
  var currentPassword = "Mot de passe actuel";
4128
4144
  var newPassword = "Nouveau mot de passe";
4129
4145
  var confirmNewPassword = "Confirmer le nouveau mot de passe";
@@ -4133,7 +4149,7 @@ var passwordChanged = "Le mot de passe a été modifié, veuillez vous connecter
4133
4149
  var passwordsNotMatching = "Les mots de passe ne correspondent pas";
4134
4150
  var weakPassword = "Votre mot de passe doit contenir au moins 6";
4135
4151
  var passwordChange_fr = {
4136
- title: title$2,
4152
+ title: title$4,
4137
4153
  currentPassword: currentPassword,
4138
4154
  newPassword: newPassword,
4139
4155
  confirmNewPassword: confirmNewPassword,
@@ -4144,7 +4160,7 @@ var passwordChange_fr = {
4144
4160
  weakPassword: weakPassword
4145
4161
  };
4146
4162
 
4147
- var title$1 = "Votre panier";
4163
+ var title$3 = "Votre panier";
4148
4164
  var subtitle$1 = "Terminez votre achat ci-dessous";
4149
4165
  var name$1 = "Produit";
4150
4166
  var quantity$1 = "Quantité";
@@ -4156,7 +4172,7 @@ var confirm$3 = "Passer à la caisse";
4156
4172
  var empty$1 = "Votre panier est vide.";
4157
4173
  var removeAll$1 = "Vider";
4158
4174
  var cart_fr = {
4159
- title: title$1,
4175
+ title: title$3,
4160
4176
  subtitle: subtitle$1,
4161
4177
  name: name$1,
4162
4178
  quantity: quantity$1,
@@ -4169,7 +4185,7 @@ var cart_fr = {
4169
4185
  removeAll: removeAll$1
4170
4186
  };
4171
4187
 
4172
- var title = "Your shopping cart";
4188
+ var title$2 = "Your shopping cart";
4173
4189
  var subtitle = "Comple your purchase below";
4174
4190
  var name = "Name";
4175
4191
  var quantity = "Quantity";
@@ -4181,7 +4197,7 @@ var confirm$2 = "Checkout";
4181
4197
  var empty = "Your cart is empty.";
4182
4198
  var removeAll = "Remove all";
4183
4199
  var cart_en = {
4184
- title: title,
4200
+ title: title$2,
4185
4201
  subtitle: subtitle,
4186
4202
  name: name,
4187
4203
  quantity: quantity,
@@ -4194,7 +4210,7 @@ var cart_en = {
4194
4210
  removeAll: removeAll
4195
4211
  };
4196
4212
 
4197
- var buttons$3 = {
4213
+ var buttons$5 = {
4198
4214
  select: "Select",
4199
4215
  added: "Added to cart",
4200
4216
  purchase: "Purchase",
@@ -4209,17 +4225,17 @@ var messages$9 = {
4209
4225
  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.",
4210
4226
  currencyMismatch: "The selected item(s) do not match your current default currency ({{currency}}). Please choose item(s) only matching this currency."
4211
4227
  };
4212
- var labels$9 = {
4228
+ var labels$b = {
4213
4229
  summary: "Order summary",
4214
4230
  total: "total"
4215
4231
  };
4216
4232
  var shop_en = {
4217
- buttons: buttons$3,
4233
+ buttons: buttons$5,
4218
4234
  messages: messages$9,
4219
- labels: labels$9
4235
+ labels: labels$b
4220
4236
  };
4221
4237
 
4222
- var buttons$2 = {
4238
+ var buttons$4 = {
4223
4239
  select: "Choisir",
4224
4240
  added: "Ajouté au panier",
4225
4241
  purchase: "Acheter",
@@ -4234,17 +4250,17 @@ var messages$8 = {
4234
4250
  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.",
4235
4251
  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."
4236
4252
  };
4237
- var labels$8 = {
4253
+ var labels$a = {
4238
4254
  summary: "récapitulatif de commande",
4239
4255
  total: "total"
4240
4256
  };
4241
4257
  var shop_fr = {
4242
- buttons: buttons$2,
4258
+ buttons: buttons$4,
4243
4259
  messages: messages$8,
4244
- labels: labels$8
4260
+ labels: labels$a
4245
4261
  };
4246
4262
 
4247
- var labels$7 = {
4263
+ var labels$9 = {
4248
4264
  cardNumber: "Numéro de carte",
4249
4265
  securityCode: "Code de sécurité",
4250
4266
  submit: "Soumettre",
@@ -4279,12 +4295,12 @@ var errors$1 = {
4279
4295
  "": ""
4280
4296
  };
4281
4297
  var payment_fr = {
4282
- labels: labels$7,
4298
+ labels: labels$9,
4283
4299
  messages: messages$7,
4284
4300
  errors: errors$1
4285
4301
  };
4286
4302
 
4287
- var labels$6 = {
4303
+ var labels$8 = {
4288
4304
  cardNumber: "Card number",
4289
4305
  securityCode: "Security Code",
4290
4306
  submit: "Submit",
@@ -4319,12 +4335,12 @@ var errors = {
4319
4335
  "": ""
4320
4336
  };
4321
4337
  var payment_en = {
4322
- labels: labels$6,
4338
+ labels: labels$8,
4323
4339
  messages: messages$6,
4324
4340
  errors: errors
4325
4341
  };
4326
4342
 
4327
- var labels$5 = {
4343
+ var labels$7 = {
4328
4344
  menu: "Pelcro Menu",
4329
4345
  name: "Name",
4330
4346
  email: "Email",
@@ -4349,6 +4365,16 @@ var labels$5 = {
4349
4365
  purchases: "Purchases",
4350
4366
  subscriptions: "Subscriptions",
4351
4367
  donations: "Donations",
4368
+ invoices: "Invoices",
4369
+ details: "Details",
4370
+ view: "View",
4371
+ paid: "Paid",
4372
+ open: "Open",
4373
+ draft: "Draft",
4374
+ scheduled: "Scheduled",
4375
+ uncollectible: "Uncollectible",
4376
+ "void": "Void",
4377
+ pastDue: "Past due",
4352
4378
  updatePaymentSource: "Update",
4353
4379
  profile: "Profile",
4354
4380
  updateProfile: "Edit profile",
@@ -4401,11 +4427,11 @@ var messages$5 = {
4401
4427
  }
4402
4428
  };
4403
4429
  var dashboard_en = {
4404
- labels: labels$5,
4430
+ labels: labels$7,
4405
4431
  messages: messages$5
4406
4432
  };
4407
4433
 
4408
- var labels$4 = {
4434
+ var labels$6 = {
4409
4435
  menu: "Menu Pelcro",
4410
4436
  name: "Nom",
4411
4437
  email: "Courriel",
@@ -4430,6 +4456,16 @@ var labels$4 = {
4430
4456
  purchases: "Achats",
4431
4457
  subscriptions: "Abonnements",
4432
4458
  donations: "Des dons",
4459
+ invoices: "Invoices",
4460
+ details: "Details",
4461
+ view: "View",
4462
+ paid: "Paid",
4463
+ open: "open",
4464
+ draft: "Draft",
4465
+ scheduled: "Scheduled",
4466
+ uncollectible: "Uncollectible",
4467
+ "void": "Void",
4468
+ pastDue: "Past due",
4433
4469
  updatePaymentSource: "Mettre à jour la source de paiement",
4434
4470
  profile: "Profil",
4435
4471
  updateProfile: "Mettre à jour le profil",
@@ -4482,7 +4518,7 @@ var messages$4 = {
4482
4518
  }
4483
4519
  };
4484
4520
  var dashboard_fr = {
4485
- labels: labels$4,
4521
+ labels: labels$6,
4486
4522
  messages: messages$4
4487
4523
  };
4488
4524
 
@@ -4491,7 +4527,7 @@ var messages$3 = {
4491
4527
  loginHere: "Login here",
4492
4528
  checkbox: "Check this box to gift this subscription"
4493
4529
  };
4494
- var labels$3 = {
4530
+ var labels$5 = {
4495
4531
  plan: {
4496
4532
  title: "Subscribe to a plan",
4497
4533
  subtitle: "Select one of the plans below and click on next."
@@ -4508,15 +4544,15 @@ var labels$3 = {
4508
4544
  or: "Or take a look at some of our other options below"
4509
4545
  }
4510
4546
  };
4511
- var buttons$1 = {
4547
+ var buttons$3 = {
4512
4548
  next: "Next",
4513
4549
  select: "Select",
4514
4550
  back: "Back"
4515
4551
  };
4516
4552
  var select_en = {
4517
4553
  messages: messages$3,
4518
- labels: labels$3,
4519
- buttons: buttons$1
4554
+ labels: labels$5,
4555
+ buttons: buttons$3
4520
4556
  };
4521
4557
 
4522
4558
  var messages$2 = {
@@ -4524,7 +4560,7 @@ var messages$2 = {
4524
4560
  loginHere: "Connectez-vous ici",
4525
4561
  checkbox: "Cochez cette case pour offrir cet abonnement"
4526
4562
  };
4527
- var labels$2 = {
4563
+ var labels$4 = {
4528
4564
  plan: {
4529
4565
  title: "Abonnez-vous à un plan",
4530
4566
  subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
@@ -4541,15 +4577,15 @@ var labels$2 = {
4541
4577
  or: "Sinon, jetez un coup d'oeil à d'autres offres ci-dessous"
4542
4578
  }
4543
4579
  };
4544
- var buttons = {
4580
+ var buttons$2 = {
4545
4581
  next: "Prochain",
4546
4582
  select: "Choisir",
4547
4583
  back: "Retour"
4548
4584
  };
4549
4585
  var select_fr = {
4550
4586
  messages: messages$2,
4551
- labels: labels$2,
4552
- buttons: buttons
4587
+ labels: labels$4,
4588
+ buttons: buttons$2
4553
4589
  };
4554
4590
 
4555
4591
  var confirm$1 = {
@@ -4572,7 +4608,7 @@ var notification_fr = {
4572
4608
  confirm: confirm
4573
4609
  };
4574
4610
 
4575
- var labels$1 = {
4611
+ var labels$3 = {
4576
4612
  title: "Verify your email",
4577
4613
  instructions: "You're on your way!\nLet's confirm your email address.\nClick on the verification link we've sent to your email:",
4578
4614
  resend: "Resend email"
@@ -4582,24 +4618,60 @@ var messages$1 = {
4582
4618
  success: "Email verified successfully!"
4583
4619
  };
4584
4620
  var verifyEmail_en = {
4585
- labels: labels$1,
4621
+ labels: labels$3,
4586
4622
  messages: messages$1
4587
4623
  };
4588
4624
 
4589
- var labels = {
4590
- title: "Vérifiez votre e-mail",
4591
- instructions: "Vous êtes en route!\nConfirmons votre adresse e-mail.\nCliquez sur le lien de vérification que nous vous avons envoyé par e-mail:",
4592
- resend: "Ré-envoyer l'email"
4625
+ var labels$2 = {
4626
+ title: "Confirmez votre courriel",
4627
+ instructions: "Confirmez votre courriel.\nVeuillez cliquer sur le lien de vérification, qui vous a été envoyé à:",
4628
+ resend: "Renvoyer le courriel"
4593
4629
  };
4594
4630
  var messages = {
4595
4631
  resent: "Renvoyé avec succès",
4596
- success: "Email vérifié avec succès!"
4632
+ success: "Adresse courriel vérifiée avec succès"
4597
4633
  };
4598
4634
  var verifyEmail_fr = {
4599
- labels: labels,
4635
+ labels: labels$2,
4600
4636
  messages: messages
4601
4637
  };
4602
4638
 
4639
+ var title$1 = "Invoice details";
4640
+ var labels$1 = {
4641
+ summary: "Summary",
4642
+ total: "Total",
4643
+ amountPaid: "Amount paid",
4644
+ amountDue: "Amount due",
4645
+ creationDate: "Created on:"
4646
+ };
4647
+ var buttons$1 = {
4648
+ download: "Download",
4649
+ pay: "Pay now"
4650
+ };
4651
+ var invoiceDetails_en = {
4652
+ title: title$1,
4653
+ labels: labels$1,
4654
+ buttons: buttons$1
4655
+ };
4656
+
4657
+ var title = "Invoice details";
4658
+ var labels = {
4659
+ summary: "Summary",
4660
+ total: "Total",
4661
+ amountPaid: "Amount paid",
4662
+ amountDue: "Amount due",
4663
+ creationDate: "Created on:"
4664
+ };
4665
+ var buttons = {
4666
+ download: "Download",
4667
+ pay: "Pay now"
4668
+ };
4669
+ var invoiceDetails_fr = {
4670
+ title: title,
4671
+ labels: labels,
4672
+ buttons: buttons
4673
+ };
4674
+
4603
4675
  function create$1(createState) {
4604
4676
  let state;
4605
4677
  const listeners = new Set();
@@ -5949,7 +6021,7 @@ class PelcroActions {
5949
6021
  view,
5950
6022
  cartItems,
5951
6023
  ...otherStateFields
5952
- } = initialState$h;
6024
+ } = initialState$i;
5953
6025
  this.set(otherStateFields);
5954
6026
  });
5955
6027
 
@@ -5993,10 +6065,11 @@ class PelcroActions {
5993
6065
  resetView,
5994
6066
  switchToCheckoutForm,
5995
6067
  product,
5996
- order
6068
+ order,
6069
+ invoice
5997
6070
  } = this.get();
5998
6071
 
5999
- if (product || order) {
6072
+ if (product || order || invoice) {
6000
6073
  // direct user to stripe checkout form when there are no existing cards
6001
6074
  if (!userHasPaymentMethod()) {
6002
6075
  return switchToCheckoutForm();
@@ -6013,7 +6086,8 @@ class PelcroActions {
6013
6086
  switchView,
6014
6087
  product,
6015
6088
  subscriptionIdToRenew,
6016
- order
6089
+ order,
6090
+ invoice
6017
6091
  } = this.get();
6018
6092
 
6019
6093
  if (product && subscriptionIdToRenew) {
@@ -6027,6 +6101,10 @@ class PelcroActions {
6027
6101
  if (order) {
6028
6102
  return switchView("order-create");
6029
6103
  }
6104
+
6105
+ if (invoice) {
6106
+ return switchView("invoice-payment");
6107
+ }
6030
6108
  });
6031
6109
 
6032
6110
  _defineProperty$3(this, "switchToAddressView", () => {
@@ -6057,6 +6135,23 @@ class PelcroActions {
6057
6135
  });
6058
6136
  });
6059
6137
 
6138
+ _defineProperty$3(this, "setInvoice", id => {
6139
+ var _window$Pelcro$invoic;
6140
+
6141
+ const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
6142
+ const invoice = invoices.find(inv => String(inv.id) === String(id));
6143
+
6144
+ if (!invoice) {
6145
+ console.error("invalid invoice id");
6146
+ return false;
6147
+ }
6148
+
6149
+ this.set({
6150
+ invoice
6151
+ });
6152
+ return true;
6153
+ });
6154
+
6060
6155
  _defineProperty$3(this, "logout", () => {
6061
6156
  var _ReactGA$event;
6062
6157
 
@@ -6245,7 +6340,7 @@ class PelcroCallbacks {
6245
6340
 
6246
6341
  }
6247
6342
 
6248
- const initialState$h = {
6343
+ const initialState$i = {
6249
6344
  // View
6250
6345
  view: null,
6251
6346
  // Plans
@@ -6260,6 +6355,8 @@ const initialState$h = {
6260
6355
  cartItems: [],
6261
6356
  order: null,
6262
6357
  // null | SKU[] | SKU,
6358
+ // invoices
6359
+ invoice: null,
6263
6360
  // User
6264
6361
  isAuthenticated: () => window.Pelcro.user.isAuthenticated(),
6265
6362
  selectedPaymentMethodId: null,
@@ -6273,7 +6370,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
6273
6370
  return {
6274
6371
  // Store setter
6275
6372
  set,
6276
- ...initialState$h,
6373
+ ...initialState$i,
6277
6374
  // State actions
6278
6375
  ...actions,
6279
6376
  // Callbacks
@@ -6424,7 +6521,7 @@ const calcAndFormatItemsTotal = (items, currency) => {
6424
6521
  */
6425
6522
 
6426
6523
  const isValidViewFromURL = viewID => {
6427
- if (["login", "register", "plan-select", "gift-redeem", "password-forgot", "password-reset", "password-change", "payment-method-update", "user-edit", "newsletter", "address-create", "order-create", "cart", "email-verify"].includes(viewID) || hasValidNewsletterUpdateUrl()) {
6524
+ if (["login", "register", "plan-select", "gift-redeem", "password-forgot", "password-reset", "password-change", "payment-method-update", "user-edit", "newsletter", "address-create", "order-create", "cart", "email-verify", "invoice-details"].includes(viewID) || hasValidNewsletterUpdateUrl()) {
6428
6525
  return true;
6429
6526
  }
6430
6527
 
@@ -6651,7 +6748,8 @@ const resources = {
6651
6748
  payment: payment_en,
6652
6749
  dashboard: dashboard_en,
6653
6750
  select: select_en,
6654
- notification: notification_en
6751
+ notification: notification_en,
6752
+ invoiceDetails: invoiceDetails_en
6655
6753
  },
6656
6754
  fr: {
6657
6755
  common: common_fr,
@@ -6674,7 +6772,8 @@ const resources = {
6674
6772
  payment: payment_fr,
6675
6773
  dashboard: dashboard_fr,
6676
6774
  select: select_fr,
6677
- notification: notification_fr
6775
+ notification: notification_fr,
6776
+ invoiceDetails: invoiceDetails_fr
6678
6777
  }
6679
6778
  }; // set UI language to the page language or default to the language in site settings
6680
6779
 
@@ -6965,8 +7064,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
6965
7064
 
6966
7065
  let e={data:""},t=t=>"undefined"!=typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e,l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(})/g,a=/\/\*[^]*?\*\/|\s\s+|\n/g,n=(e,t)=>{let r,l="",a="",o="";for(let c in e){let s=e[c];"object"==typeof s?(r=t?t.replace(/([^,])+/g,e=>c.replace(/([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):c,a+="@"==c[0]?"f"==c[1]?n(s,c):c+"{"+n(s,"k"==c[1]?"":t)+"}":n(s,r)):"@"==c[0]&&"i"==c[1]?l=c+" "+s+";":(c=c.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=n.p?n.p(c,s):c+":"+s+";");}return o[0]?(r=t?t+"{"+o+"}":o,l+r+a):l+a},o={},c=e=>{let t="";for(let r in e)t+=r+("object"==typeof e[r]?c(e[r]):e[r]);return t},s=(e,t,r,s,i)=>{let p="object"==typeof e?c(e):e,u=o[p]||(o[p]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(p));if(!o[u]){let t="object"==typeof e?e:(e=>{let t,r=[{}];for(;t=l.exec(e.replace(a,""));)t[4]&&r.shift(),t[3]?r.unshift(r[0][t[3]]=r[0][t[3]]||{}):t[4]||(r[0][t[1]]=t[2]);return r[0]})(e);o[u]=n(i?{["@keyframes "+u]:t}:t,r?"":"."+u);}return ((e,t,r)=>{-1==t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(o[u],t,s),u},i=(e,t,r)=>e.reduce((e,l,a)=>{let o=t[a];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":n(e,""):e;}return e+l+(null==o?"":o)},"");function p(e){let r=this||{},l=e.call?e(r.p):e;return s(l.unshift?l.raw?i(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>t?Object.assign(e,t.call?t(r.p):t):e,{}):l,t(r.target),r.g,r.o,r.k)}let u,f,d;p.bind({g:1});let b=p.bind({k:1});function h(e,t,r,l){n.p=t,u=e,f=r,d=l;}function y(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f&&f()},c),r.o=/ *go\d+/.test(s),c.className=p.apply(r,l)+(s?" "+s:""),t&&(c.ref=o);let i=c.as||e;return d&&i[0]&&d(c),u(i,c)}return t?t(a):a}}
6967
7066
 
6968
- function _extends$y() {
6969
- _extends$y = Object.assign || function (target) {
7067
+ function _extends$z() {
7068
+ _extends$z = Object.assign || function (target) {
6970
7069
  for (var i = 1; i < arguments.length; i++) {
6971
7070
  var source = arguments[i];
6972
7071
 
@@ -6980,7 +7079,7 @@ function _extends$y() {
6980
7079
  return target;
6981
7080
  };
6982
7081
 
6983
- return _extends$y.apply(this, arguments);
7082
+ return _extends$z.apply(this, arguments);
6984
7083
  }
6985
7084
 
6986
7085
  function _taggedTemplateLiteralLoose(strings, raw) {
@@ -7070,7 +7169,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
7070
7169
  var reducer = function reducer(state, action) {
7071
7170
  switch (action.type) {
7072
7171
  case ActionType.ADD_TOAST:
7073
- return _extends$y({}, state, {
7172
+ return _extends$z({}, state, {
7074
7173
  toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
7075
7174
  });
7076
7175
 
@@ -7080,9 +7179,9 @@ var reducer = function reducer(state, action) {
7080
7179
  clearFromRemoveQueue(action.toast.id);
7081
7180
  }
7082
7181
 
7083
- return _extends$y({}, state, {
7182
+ return _extends$z({}, state, {
7084
7183
  toasts: state.toasts.map(function (t) {
7085
- return t.id === action.toast.id ? _extends$y({}, t, action.toast) : t;
7184
+ return t.id === action.toast.id ? _extends$z({}, t, action.toast) : t;
7086
7185
  })
7087
7186
  });
7088
7187
 
@@ -7109,9 +7208,9 @@ var reducer = function reducer(state, action) {
7109
7208
  });
7110
7209
  }
7111
7210
 
7112
- return _extends$y({}, state, {
7211
+ return _extends$z({}, state, {
7113
7212
  toasts: state.toasts.map(function (t) {
7114
- return t.id === toastId || toastId === undefined ? _extends$y({}, t, {
7213
+ return t.id === toastId || toastId === undefined ? _extends$z({}, t, {
7115
7214
  visible: false
7116
7215
  }) : t;
7117
7216
  })
@@ -7119,28 +7218,28 @@ var reducer = function reducer(state, action) {
7119
7218
 
7120
7219
  case ActionType.REMOVE_TOAST:
7121
7220
  if (action.toastId === undefined) {
7122
- return _extends$y({}, state, {
7221
+ return _extends$z({}, state, {
7123
7222
  toasts: []
7124
7223
  });
7125
7224
  }
7126
7225
 
7127
- return _extends$y({}, state, {
7226
+ return _extends$z({}, state, {
7128
7227
  toasts: state.toasts.filter(function (t) {
7129
7228
  return t.id !== action.toastId;
7130
7229
  })
7131
7230
  });
7132
7231
 
7133
7232
  case ActionType.START_PAUSE:
7134
- return _extends$y({}, state, {
7233
+ return _extends$z({}, state, {
7135
7234
  pausedAt: action.time
7136
7235
  });
7137
7236
 
7138
7237
  case ActionType.END_PAUSE:
7139
7238
  var diff = action.time - (state.pausedAt || 0);
7140
- return _extends$y({}, state, {
7239
+ return _extends$z({}, state, {
7141
7240
  pausedAt: undefined,
7142
7241
  toasts: state.toasts.map(function (t) {
7143
- return _extends$y({}, t, {
7242
+ return _extends$z({}, t, {
7144
7243
  pauseDuration: t.pauseDuration + diff
7145
7244
  });
7146
7245
  })
@@ -7187,12 +7286,12 @@ var useStore = function useStore(toastOptions) {
7187
7286
  var mergedToasts = state.toasts.map(function (t) {
7188
7287
  var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
7189
7288
 
7190
- return _extends$y({}, toastOptions, toastOptions[t.type], t, {
7289
+ return _extends$z({}, toastOptions, toastOptions[t.type], t, {
7191
7290
  duration: t.duration || ((_toastOptions$t$type = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type.duration) || ((_toastOptions = toastOptions) == null ? void 0 : _toastOptions.duration) || defaultTimeouts[t.type],
7192
- style: _extends$y({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7291
+ style: _extends$z({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7193
7292
  });
7194
7293
  });
7195
- return _extends$y({}, state, {
7294
+ return _extends$z({}, state, {
7196
7295
  toasts: mergedToasts
7197
7296
  });
7198
7297
  };
@@ -7202,7 +7301,7 @@ var createToast = function createToast(message, type, opts) {
7202
7301
  type = 'blank';
7203
7302
  }
7204
7303
 
7205
- return _extends$y({
7304
+ return _extends$z({
7206
7305
  createdAt: Date.now(),
7207
7306
  visible: true,
7208
7307
  type: type,
@@ -7252,14 +7351,14 @@ toast.remove = function (toastId) {
7252
7351
  };
7253
7352
 
7254
7353
  toast.promise = function (promise, msgs, opts) {
7255
- var id = toast.loading(msgs.loading, _extends$y({}, opts, opts == null ? void 0 : opts.loading));
7354
+ var id = toast.loading(msgs.loading, _extends$z({}, opts, opts == null ? void 0 : opts.loading));
7256
7355
  promise.then(function (p) {
7257
- toast.success(resolveValue(msgs.success, p), _extends$y({
7356
+ toast.success(resolveValue(msgs.success, p), _extends$z({
7258
7357
  id: id
7259
7358
  }, opts, opts == null ? void 0 : opts.success));
7260
7359
  return p;
7261
7360
  })["catch"](function (e) {
7262
- toast.error(resolveValue(msgs.error, e), _extends$y({
7361
+ toast.error(resolveValue(msgs.error, e), _extends$z({
7263
7362
  id: id
7264
7363
  }, opts, opts == null ? void 0 : opts.error));
7265
7364
  });
@@ -7598,7 +7697,7 @@ var ToastBar = /*#__PURE__*/memo(function (_ref2) {
7598
7697
  var message = createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
7599
7698
  return createElement(ToastBarBase, {
7600
7699
  className: toast.className,
7601
- style: _extends$y({}, animationStyle, style, toast.style)
7700
+ style: _extends$z({}, animationStyle, style, toast.style)
7602
7701
  }, typeof children === 'function' ? children({
7603
7702
  icon: icon,
7604
7703
  message: message
@@ -7628,7 +7727,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
7628
7727
  } : position.includes('right') ? {
7629
7728
  justifyContent: 'flex-end'
7630
7729
  } : {};
7631
- return _extends$y({
7730
+ return _extends$z({
7632
7731
  left: 0,
7633
7732
  right: 0,
7634
7733
  display: 'flex',
@@ -7655,7 +7754,7 @@ var Toaster = function Toaster(_ref) {
7655
7754
  handlers = _useToaster.handlers;
7656
7755
 
7657
7756
  return createElement("div", {
7658
- style: _extends$y({
7757
+ style: _extends$z({
7659
7758
  position: 'fixed',
7660
7759
  zIndex: 9999,
7661
7760
  top: DEFAULT_OFFSET,
@@ -7690,82 +7789,82 @@ var Toaster = function Toaster(_ref) {
7690
7789
  }));
7691
7790
  };
7692
7791
 
7693
- var _path$v;
7792
+ var _path$w;
7694
7793
 
7695
- function _extends$x() { _extends$x = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$x.apply(this, arguments); }
7794
+ function _extends$y() { _extends$y = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$y.apply(this, arguments); }
7696
7795
 
7697
7796
  function SvgCheckSolid(props) {
7698
- return /*#__PURE__*/React.createElement("svg", _extends$x({
7797
+ return /*#__PURE__*/React.createElement("svg", _extends$y({
7699
7798
  xmlns: "http://www.w3.org/2000/svg",
7700
7799
  className: "h-5 w-5",
7701
7800
  viewBox: "0 0 20 20",
7702
7801
  fill: "currentColor"
7703
- }, props), _path$v || (_path$v = /*#__PURE__*/React.createElement("path", {
7802
+ }, props), _path$w || (_path$w = /*#__PURE__*/React.createElement("path", {
7704
7803
  fillRule: "evenodd",
7705
7804
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
7706
7805
  clipRule: "evenodd"
7707
7806
  })));
7708
7807
  }
7709
7808
 
7710
- var _path$u;
7809
+ var _path$v;
7711
7810
 
7712
- function _extends$w() { _extends$w = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
7811
+ function _extends$x() { _extends$x = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$x.apply(this, arguments); }
7713
7812
 
7714
7813
  function SvgXIcon(props) {
7715
- return /*#__PURE__*/React.createElement("svg", _extends$w({
7814
+ return /*#__PURE__*/React.createElement("svg", _extends$x({
7716
7815
  xmlns: "http://www.w3.org/2000/svg",
7717
7816
  viewBox: "0 0 20 20",
7718
7817
  fill: "currentColor"
7719
- }, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
7818
+ }, props), _path$v || (_path$v = /*#__PURE__*/React.createElement("path", {
7720
7819
  fill: "evenodd",
7721
7820
  d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
7722
7821
  clipRule: "evenodd"
7723
7822
  })));
7724
7823
  }
7725
7824
 
7726
- var _path$t;
7825
+ var _path$u;
7727
7826
 
7728
- function _extends$v() { _extends$v = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
7827
+ function _extends$w() { _extends$w = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
7729
7828
 
7730
7829
  function SvgXIconSolid(props) {
7731
- return /*#__PURE__*/React.createElement("svg", _extends$v({
7830
+ return /*#__PURE__*/React.createElement("svg", _extends$w({
7732
7831
  className: "plc-w-4 plc-h-4",
7733
7832
  fill: "currentColor",
7734
7833
  xmlns: "http://www.w3.org/2000/svg",
7735
7834
  viewBox: "0 0 100 100"
7736
- }, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
7835
+ }, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
7737
7836
  d: "M94.842 48.408c0 24.852-20.148 44.999-45.002 44.999-24.851 0-44.997-20.146-44.997-44.999 0-24.854 20.146-45 44.997-45 24.853 0 45.002 20.146 45.002 45zM71.073 64.841L54.73 48.497l16.344-16.344-4.979-4.979-16.343 16.345-16.343-16.344-4.799 4.799 16.344 16.344L28.61 64.661l4.979 4.978 16.344-16.344 16.343 16.344 4.797-4.798z"
7738
7837
  })));
7739
7838
  }
7740
7839
 
7741
- var _path$s;
7840
+ var _path$t;
7742
7841
 
7743
- function _extends$u() { _extends$u = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
7842
+ function _extends$v() { _extends$v = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
7744
7843
 
7745
7844
  function SvgExclamation(props) {
7746
- return /*#__PURE__*/React.createElement("svg", _extends$u({
7845
+ return /*#__PURE__*/React.createElement("svg", _extends$v({
7747
7846
  className: "plc-w-4 plc-h-4 plc-mr-1",
7748
7847
  xmlns: "http://www.w3.org/2000/svg",
7749
7848
  viewBox: "0 0 20 20",
7750
7849
  fill: "currentColor"
7751
- }, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
7850
+ }, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
7752
7851
  fillRule: "evenodd",
7753
7852
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",
7754
7853
  clipRule: "evenodd"
7755
7854
  })));
7756
7855
  }
7757
7856
 
7758
- var _path$r, _path2$4;
7857
+ var _path$s, _path2$4;
7759
7858
 
7760
- function _extends$t() { _extends$t = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
7859
+ function _extends$u() { _extends$u = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
7761
7860
 
7762
7861
  function SvgSpinner(props) {
7763
- return /*#__PURE__*/React.createElement("svg", _extends$t({
7862
+ return /*#__PURE__*/React.createElement("svg", _extends$u({
7764
7863
  className: "plc-animate-spin",
7765
7864
  viewBox: "0 0 24 24",
7766
7865
  fill: "currentColor",
7767
7866
  xmlns: "http://www.w3.org/2000/svg"
7768
- }, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
7867
+ }, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
7769
7868
  opacity: 0.2,
7770
7869
  fill: "evenodd",
7771
7870
  clipRule: "evenodd",
@@ -8799,6 +8898,10 @@ const initViewFromURL = () => {
8799
8898
  return verifyEmailTokenFromUrl();
8800
8899
  }
8801
8900
 
8901
+ if (view === "invoice-details") {
8902
+ return showInvoiceDetailsFromUrl();
8903
+ }
8904
+
8802
8905
  switchView(view);
8803
8906
  });
8804
8907
  }
@@ -8975,6 +9078,43 @@ const verifyEmailTokenFromUrl = () => {
8975
9078
  });
8976
9079
  };
8977
9080
 
9081
+ const showInvoiceDetailsFromUrl = () => {
9082
+ const {
9083
+ isAuthenticated,
9084
+ setInvoice,
9085
+ whenSiteReady,
9086
+ switchView
9087
+ } = usePelcro.getStore();
9088
+ whenSiteReady(() => {
9089
+ if (!isAuthenticated()) {
9090
+ return switchView("login");
9091
+ }
9092
+
9093
+ const invoiceId = window.Pelcro.helpers.getURLParameter("id");
9094
+ const wasSetSuccessfully = setInvoice(invoiceId);
9095
+
9096
+ if (!wasSetSuccessfully) {
9097
+ const errorMessage = i18next.t("messages:invalidInvoice", {
9098
+ returnObjects: true
9099
+ });
9100
+ return notify.error(errorMessage);
9101
+ }
9102
+
9103
+ const {
9104
+ invoice
9105
+ } = usePelcro.getStore();
9106
+
9107
+ if (invoice.total === 0) {
9108
+ const errorMessage = i18next.t("messages:zeroTotalInvoice", {
9109
+ returnObjects: true
9110
+ });
9111
+ return notify.error(errorMessage);
9112
+ }
9113
+
9114
+ return switchView("invoice-details");
9115
+ });
9116
+ };
9117
+
8978
9118
  const defaultOptions = {
8979
9119
  loadPaymentSDKs: true,
8980
9120
  loadAuth0SDK: true,
@@ -9314,7 +9454,7 @@ const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
9314
9454
  const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
9315
9455
  const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
9316
9456
 
9317
- const initialState$g = {
9457
+ const initialState$h = {
9318
9458
  email: "",
9319
9459
  password: "",
9320
9460
  emailError: null,
@@ -9325,10 +9465,10 @@ const initialState$g = {
9325
9465
  content: ""
9326
9466
  }
9327
9467
  };
9328
- const store$g = /*#__PURE__*/createContext(initialState$g);
9468
+ const store$h = /*#__PURE__*/createContext(initialState$h);
9329
9469
  const {
9330
- Provider: Provider$g
9331
- } = store$g;
9470
+ Provider: Provider$h
9471
+ } = store$h;
9332
9472
 
9333
9473
  const LoginContainer = ({
9334
9474
  style,
@@ -9435,7 +9575,7 @@ const LoginContainer = ({
9435
9575
  });
9436
9576
 
9437
9577
  case RESET_LOGIN_FORM:
9438
- return initialState$g;
9578
+ return initialState$h;
9439
9579
 
9440
9580
  case DISABLE_LOGIN_BUTTON:
9441
9581
  return lib_7({ ...state,
@@ -9453,12 +9593,12 @@ const LoginContainer = ({
9453
9593
  default:
9454
9594
  return state;
9455
9595
  }
9456
- }, initialState$g);
9596
+ }, initialState$h);
9457
9597
  return /*#__PURE__*/React__default.createElement("div", {
9458
9598
  style: { ...style
9459
9599
  },
9460
9600
  className: `pelcro-container pelcro-login-container ${className}`
9461
- }, /*#__PURE__*/React__default.createElement(Provider$g, {
9601
+ }, /*#__PURE__*/React__default.createElement(Provider$h, {
9462
9602
  value: {
9463
9603
  state,
9464
9604
  dispatch
@@ -9466,12 +9606,12 @@ const LoginContainer = ({
9466
9606
  }, children.length ? children.map((child, i) => {
9467
9607
  if (child) {
9468
9608
  return /*#__PURE__*/React__default.cloneElement(child, {
9469
- store: store$g,
9609
+ store: store$h,
9470
9610
  key: i
9471
9611
  });
9472
9612
  }
9473
9613
  }) : /*#__PURE__*/React__default.cloneElement(children, {
9474
- store: store$g
9614
+ store: store$h
9475
9615
  })));
9476
9616
  };
9477
9617
 
@@ -9716,7 +9856,7 @@ const LoginButton = ({
9716
9856
  buttonDisabled
9717
9857
  },
9718
9858
  dispatch
9719
- } = useContext(store$g);
9859
+ } = useContext(store$h);
9720
9860
  const {
9721
9861
  t
9722
9862
  } = useTranslation("login");
@@ -9737,23 +9877,23 @@ const LoginButton = ({
9737
9877
  };
9738
9878
 
9739
9879
  const LoginEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
9740
- store: store$g
9880
+ store: store$h
9741
9881
  }, props));
9742
9882
 
9743
9883
  const LoginPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
9744
- store: store$g
9884
+ store: store$h
9745
9885
  }, props));
9746
9886
 
9747
- var _path$q;
9887
+ var _path$r;
9748
9888
 
9749
- function _extends$s() { _extends$s = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
9889
+ function _extends$t() { _extends$t = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
9750
9890
 
9751
9891
  function SvgCheck(props) {
9752
- return /*#__PURE__*/React.createElement("svg", _extends$s({
9892
+ return /*#__PURE__*/React.createElement("svg", _extends$t({
9753
9893
  xmlns: "http://www.w3.org/2000/svg",
9754
9894
  fill: "currentColor",
9755
9895
  viewBox: "0 0 20 20"
9756
- }, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
9896
+ }, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
9757
9897
  fillRule: "evenodd",
9758
9898
  d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
9759
9899
  clipRule: "evenodd"
@@ -9818,7 +9958,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
9818
9958
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
9819
9959
  facebookLoginRenderProps.FacebookLogin;
9820
9960
 
9821
- const initialState$f = {
9961
+ const initialState$g = {
9822
9962
  email: "",
9823
9963
  password: "",
9824
9964
  emailError: null,
@@ -9835,10 +9975,10 @@ const initialState$f = {
9835
9975
  content: ""
9836
9976
  }
9837
9977
  };
9838
- const store$f = /*#__PURE__*/createContext(initialState$f);
9978
+ const store$g = /*#__PURE__*/createContext(initialState$g);
9839
9979
  const {
9840
- Provider: Provider$f
9841
- } = store$f;
9980
+ Provider: Provider$g
9981
+ } = store$g;
9842
9982
 
9843
9983
  const RegisterContainer = ({
9844
9984
  style,
@@ -10021,7 +10161,7 @@ const RegisterContainer = ({
10021
10161
  });
10022
10162
 
10023
10163
  case RESET_LOGIN_FORM:
10024
- return initialState$f;
10164
+ return initialState$g;
10025
10165
 
10026
10166
  case DISABLE_REGISTRATION_BUTTON:
10027
10167
  return lib_7({ ...state,
@@ -10039,12 +10179,12 @@ const RegisterContainer = ({
10039
10179
  default:
10040
10180
  return state;
10041
10181
  }
10042
- }, initialState$f);
10182
+ }, initialState$g);
10043
10183
  return /*#__PURE__*/React__default.createElement("div", {
10044
10184
  style: { ...style
10045
10185
  },
10046
10186
  className: `pelcro-container pelcro-register-container ${className}`
10047
- }, /*#__PURE__*/React__default.createElement(Provider$f, {
10187
+ }, /*#__PURE__*/React__default.createElement(Provider$g, {
10048
10188
  value: {
10049
10189
  state,
10050
10190
  dispatch
@@ -10052,12 +10192,12 @@ const RegisterContainer = ({
10052
10192
  }, children.length ? children.map((child, i) => {
10053
10193
  if (child) {
10054
10194
  return /*#__PURE__*/React__default.cloneElement(child, {
10055
- store: store$f,
10195
+ store: store$g,
10056
10196
  key: i
10057
10197
  });
10058
10198
  }
10059
10199
  }) : /*#__PURE__*/React__default.cloneElement(children, {
10060
- store: store$f
10200
+ store: store$g
10061
10201
  })));
10062
10202
  };
10063
10203
  /**
@@ -10072,15 +10212,15 @@ function hasSecurityTokenEnabled$1() {
10072
10212
  return hasSecuritySdkLoaded;
10073
10213
  }
10074
10214
 
10075
- var _path$p;
10215
+ var _path$q;
10076
10216
 
10077
- function _extends$r() { _extends$r = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
10217
+ function _extends$s() { _extends$s = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
10078
10218
 
10079
10219
  function SvgFacebookLogo(props) {
10080
- return /*#__PURE__*/React.createElement("svg", _extends$r({
10220
+ return /*#__PURE__*/React.createElement("svg", _extends$s({
10081
10221
  xmlns: "http://www.w3.org/2000/svg",
10082
10222
  viewBox: "88.428 12.828 107.543 207.085"
10083
- }, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
10223
+ }, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
10084
10224
  d: "M158.232 219.912v-94.461h31.707l4.747-36.813h-36.454V65.134c0-10.658 2.96-17.922 18.245-17.922l19.494-.009V14.278c-3.373-.447-14.944-1.449-28.406-1.449-28.106 0-47.348 17.155-47.348 48.661v27.149H88.428v36.813h31.788v94.461l38.016-.001z",
10085
10225
  fill: "#3c5a9a"
10086
10226
  })));
@@ -10097,10 +10237,10 @@ const FacebookLoginButton = ({
10097
10237
  const facebookLoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id;
10098
10238
  const {
10099
10239
  dispatch: loginDispatch
10100
- } = useContext(store$g);
10240
+ } = useContext(store$h);
10101
10241
  const {
10102
10242
  dispatch: registerDispatch
10103
- } = useContext(store$f);
10243
+ } = useContext(store$g);
10104
10244
 
10105
10245
  const onSuccess = facebookUser => {
10106
10246
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
@@ -10153,15 +10293,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
10153
10293
  unwrapExports(googleLogin);
10154
10294
  var googleLogin_1 = googleLogin.GoogleLogin;
10155
10295
 
10156
- var _path$o, _path2$3, _path3$1, _path4;
10296
+ var _path$p, _path2$3, _path3$1, _path4;
10157
10297
 
10158
- function _extends$q() { _extends$q = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
10298
+ function _extends$r() { _extends$r = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
10159
10299
 
10160
10300
  function SvgGoogleLogo(props) {
10161
- return /*#__PURE__*/React.createElement("svg", _extends$q({
10301
+ return /*#__PURE__*/React.createElement("svg", _extends$r({
10162
10302
  viewBox: "0 0 24 24",
10163
10303
  xmlns: "http://www.w3.org/2000/svg"
10164
- }, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
10304
+ }, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
10165
10305
  fill: "#4285F4",
10166
10306
  d: "M23.745 12.27c0-.79-.07-1.54-.19-2.27h-11.3v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"
10167
10307
  })), _path2$3 || (_path2$3 = /*#__PURE__*/React.createElement("path", {
@@ -10187,10 +10327,10 @@ const GoogleLoginButton = ({
10187
10327
  const googleLoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.google_app_id;
10188
10328
  const {
10189
10329
  dispatch: loginDispatch
10190
- } = useContext(store$g);
10330
+ } = useContext(store$h);
10191
10331
  const {
10192
10332
  dispatch: registerDispatch
10193
- } = useContext(store$f);
10333
+ } = useContext(store$g);
10194
10334
 
10195
10335
  const onSuccess = response => {
10196
10336
  var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
@@ -10238,15 +10378,15 @@ const GoogleLoginButton = ({
10238
10378
  }) : null;
10239
10379
  };
10240
10380
 
10241
- var _path$n;
10381
+ var _path$o;
10242
10382
 
10243
- function _extends$p() { _extends$p = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
10383
+ function _extends$q() { _extends$q = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
10244
10384
 
10245
10385
  function SvgAuth0Logo(props) {
10246
- return /*#__PURE__*/React.createElement("svg", _extends$p({
10386
+ return /*#__PURE__*/React.createElement("svg", _extends$q({
10247
10387
  viewBox: "0 0 256 285",
10248
10388
  xmlns: "http://www.w3.org/2000/svg"
10249
- }, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
10389
+ }, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
10250
10390
  d: "M220.412 0h-92.415l28.562 89.006h92.416l-74.77 53.077 28.57 89.511c48.128-35.06 63.854-88.12 46.208-142.588L220.413 0zM7.018 89.006h92.416L127.997 0H35.589L7.019 89.006c-17.655 54.468-1.92 107.529 46.207 142.588l28.563-89.51-74.77-53.078zm46.208 142.588l74.77 52.97 74.77-52.97-74.77-53.847-74.77 53.847z"
10251
10391
  })));
10252
10392
  }
@@ -10286,10 +10426,10 @@ const Auth0LoginButton = ({
10286
10426
  }, [auth0Enabled, auth0Loaded]);
10287
10427
  const {
10288
10428
  dispatch: loginDispatch
10289
- } = useContext(store$g);
10429
+ } = useContext(store$h);
10290
10430
  const {
10291
10431
  dispatch: registerDispatch
10292
- } = useContext(store$f);
10432
+ } = useContext(store$g);
10293
10433
 
10294
10434
  function handleClick() {
10295
10435
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
@@ -10422,15 +10562,15 @@ function LoginView(props) {
10422
10562
  }, /*#__PURE__*/React__default.createElement(GoogleLoginButton, null), /*#__PURE__*/React__default.createElement(FacebookLoginButton, null), /*#__PURE__*/React__default.createElement(Auth0LoginButton, null))))));
10423
10563
  }
10424
10564
 
10425
- var _path$m, _path2$2, _path3;
10565
+ var _path$n, _path2$2, _path3;
10426
10566
 
10427
- function _extends$o() { _extends$o = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
10567
+ function _extends$p() { _extends$p = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
10428
10568
 
10429
10569
  function SvgPelcroAuthorship(props) {
10430
- return /*#__PURE__*/React.createElement("svg", _extends$o({
10570
+ return /*#__PURE__*/React.createElement("svg", _extends$p({
10431
10571
  xmlns: "http://www.w3.org/2000/svg",
10432
10572
  viewBox: "0 -80.652 497.072 179.991"
10433
- }, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
10573
+ }, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
10434
10574
  fill: "none",
10435
10575
  stroke: "#4a4a4a",
10436
10576
  d: "M487.89 42.299c0 13.158-10.671 23.829-23.829 23.829H37.074c-13.162 0-23.832-10.671-23.832-23.829v-63.552c0-13.158 10.67-23.831 23.832-23.831H464.06c13.158 0 23.829 10.672 23.829 23.831l.001 63.552z"
@@ -10577,11 +10717,11 @@ function LoginModal({
10577
10717
  LoginModal.viewId = "login";
10578
10718
 
10579
10719
  const RegisterEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
10580
- store: store$f
10720
+ store: store$g
10581
10721
  }, props));
10582
10722
 
10583
10723
  const RegisterPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
10584
- store: store$f
10724
+ store: store$g
10585
10725
  }, props));
10586
10726
 
10587
10727
  const RegisterButton = ({
@@ -10601,7 +10741,7 @@ const RegisterButton = ({
10601
10741
  buttonDisabled
10602
10742
  },
10603
10743
  dispatch
10604
- } = useContext(store$f);
10744
+ } = useContext(store$g);
10605
10745
  const {
10606
10746
  t
10607
10747
  } = useTranslation("register");
@@ -10739,7 +10879,7 @@ function FirstName({
10739
10879
  }
10740
10880
 
10741
10881
  const RegisterFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
10742
- store: store$f
10882
+ store: store$g
10743
10883
  }, props));
10744
10884
 
10745
10885
  function LastName({
@@ -10770,7 +10910,7 @@ function LastName({
10770
10910
  }
10771
10911
 
10772
10912
  const RegisterLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
10773
- store: store$f
10913
+ store: store$g
10774
10914
  }, props));
10775
10915
 
10776
10916
  /**
@@ -10894,7 +11034,7 @@ function TextInput({
10894
11034
 
10895
11035
  const RegisterTextInput = props => {
10896
11036
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
10897
- store: store$f
11037
+ store: store$g
10898
11038
  }));
10899
11039
  };
10900
11040
 
@@ -12563,7 +12703,8 @@ const SUBSCRIPTION_TYPES = {
12563
12703
  CREATE_SUBSCRIPTION: "CREATE_SUBSCRIPTION",
12564
12704
  CREATE_GIFTED_SUBSCRIPTION: "CREATE_GIFTED_SUBSCRIPTION",
12565
12705
  RENEW_SUBSCRIPTION: "RENEW_SUBSCRIPTION",
12566
- RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION"
12706
+ RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION",
12707
+ PAY_INVOICE: "PAY_INVOICE"
12567
12708
  };
12568
12709
 
12569
12710
  var _isPaymentGatewayInvalid = /*#__PURE__*/new WeakMap();
@@ -12625,6 +12766,8 @@ class Subscription {
12625
12766
  * @property {number} [subscriptionIdToRenew]
12626
12767
  * @property {number} [quantity]
12627
12768
  * @property {string} addressId
12769
+ * @property {number} invoiceId
12770
+ * @property {boolean} isExistingSource
12628
12771
  */
12629
12772
 
12630
12773
  /**
@@ -12665,6 +12808,8 @@ var _renewSubscription = /*#__PURE__*/new WeakMap();
12665
12808
 
12666
12809
  var _renewGiftedSubscription = /*#__PURE__*/new WeakMap();
12667
12810
 
12811
+ var _payInvoice = /*#__PURE__*/new WeakMap();
12812
+
12668
12813
  class StripeGateway {
12669
12814
  constructor() {
12670
12815
  _paymentGateway.set(this, {
@@ -12688,6 +12833,9 @@ class StripeGateway {
12688
12833
  case types.RENEW_GIFTED_SUBSCRIPTION:
12689
12834
  return _classPrivateFieldGet(this, _renewGiftedSubscription).call(this, options, callback);
12690
12835
 
12836
+ case types.PAY_INVOICE:
12837
+ return _classPrivateFieldGet(this, _payInvoice).call(this, options, callback);
12838
+
12691
12839
  default:
12692
12840
  console.error("Unsupported subscriptiion method: Stripe Gateway");
12693
12841
  }
@@ -12796,6 +12944,27 @@ class StripeGateway {
12796
12944
  });
12797
12945
  }
12798
12946
  });
12947
+
12948
+ _payInvoice.set(this, {
12949
+ writable: true,
12950
+ value: (options, callback) => {
12951
+ const {
12952
+ token,
12953
+ invoiceId
12954
+ } = options;
12955
+ const params = options.isExistingSource ? {
12956
+ source_id: token,
12957
+ invoice_id: invoiceId
12958
+ } : {
12959
+ payment_gateway: _classPrivateFieldGet(this, _paymentGateway),
12960
+ gateway_token: token,
12961
+ invoice_id: invoiceId
12962
+ };
12963
+ window.Pelcro.invoice.pay(params, (err, res) => {
12964
+ callback(err, res);
12965
+ });
12966
+ }
12967
+ });
12799
12968
  }
12800
12969
 
12801
12970
  }
@@ -12809,6 +12978,8 @@ var _createSubscription2 = /*#__PURE__*/new WeakMap();
12809
12978
 
12810
12979
  var _createGiftedSubscription2 = /*#__PURE__*/new WeakMap();
12811
12980
 
12981
+ var _payInvoice2 = /*#__PURE__*/new WeakMap();
12982
+
12812
12983
  class PaypalGateWay {
12813
12984
  constructor() {
12814
12985
  _paymentGateway2.set(this, {
@@ -12826,6 +12997,9 @@ class PaypalGateWay {
12826
12997
  case types.CREATE_GIFTED_SUBSCRIPTION:
12827
12998
  return _classPrivateFieldGet(this, _createGiftedSubscription2).call(this, options, callback);
12828
12999
 
13000
+ case types.PAY_INVOICE:
13001
+ return _classPrivateFieldGet(this, _payInvoice2).call(this, options, callback);
13002
+
12829
13003
  default:
12830
13004
  console.error("Unsupported subscriptiion method: PayPal Gateway");
12831
13005
  }
@@ -12886,6 +13060,23 @@ class PaypalGateWay {
12886
13060
  });
12887
13061
  }
12888
13062
  });
13063
+
13064
+ _payInvoice2.set(this, {
13065
+ writable: true,
13066
+ value: (options, callback) => {
13067
+ const {
13068
+ token,
13069
+ invoiceId
13070
+ } = options;
13071
+ window.Pelcro.invoice.pay({
13072
+ payment_gateway: _classPrivateFieldGet(this, _paymentGateway2),
13073
+ gateway_token: token,
13074
+ invoice_id: invoiceId
13075
+ }, (err, res) => {
13076
+ callback(err, res);
13077
+ });
13078
+ }
13079
+ });
12889
13080
  }
12890
13081
 
12891
13082
  }
@@ -12910,7 +13101,7 @@ class PaypalGateWay {
12910
13101
 
12911
13102
  /** @type {PaymentStateType} */
12912
13103
 
12913
- const initialState$e = {
13104
+ const initialState$f = {
12914
13105
  disableSubmit: false,
12915
13106
  isLoading: false,
12916
13107
  disableCouponButton: false,
@@ -12929,10 +13120,10 @@ const initialState$e = {
12929
13120
  content: ""
12930
13121
  }
12931
13122
  };
12932
- const store$e = /*#__PURE__*/createContext(initialState$e);
13123
+ const store$f = /*#__PURE__*/createContext(initialState$f);
12933
13124
  const {
12934
- Provider: Provider$e
12935
- } = store$e;
13125
+ Provider: Provider$f
13126
+ } = store$f;
12936
13127
 
12937
13128
  const PaymentMethodContainerWithoutStripe = ({
12938
13129
  style,
@@ -12945,7 +13136,7 @@ const PaymentMethodContainerWithoutStripe = ({
12945
13136
  onFailure = () => {},
12946
13137
  ...props
12947
13138
  }) => {
12948
- var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift;
13139
+ var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift, _props$invoice;
12949
13140
 
12950
13141
  const {
12951
13142
  t
@@ -12962,6 +13153,7 @@ const PaymentMethodContainerWithoutStripe = ({
12962
13153
  const selectedAddressId = (_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : pelcroStore.selectedAddressId;
12963
13154
  const giftRecipient = (_props$giftRecipient = props.giftRecipient) !== null && _props$giftRecipient !== void 0 ? _props$giftRecipient : pelcroStore.giftRecipient;
12964
13155
  const isRenewingGift = (_props$isRenewingGift = props.isRenewingGift) !== null && _props$isRenewingGift !== void 0 ? _props$isRenewingGift : pelcroStore.isRenewingGift;
13156
+ const invoice = (_props$invoice = props.invoice) !== null && _props$invoice !== void 0 ? _props$invoice : pelcroStore.invoice;
12965
13157
  useEffect(() => {
12966
13158
  if (window.Pelcro.coupon.getFromUrl()) {
12967
13159
  dispatch({
@@ -13530,6 +13722,38 @@ const PaymentMethodContainerWithoutStripe = ({
13530
13722
  });
13531
13723
  };
13532
13724
 
13725
+ const payInvoice = (gatewayService, gatewayToken, dispatch) => {
13726
+ const subscription = new Subscription(gatewayService);
13727
+ return subscription.execute({
13728
+ type: SUBSCRIPTION_TYPES.PAY_INVOICE,
13729
+ token: gatewayToken,
13730
+ isExistingSource: Boolean(selectedPaymentMethodId),
13731
+ invoiceId: invoice.id
13732
+ }, (err, res) => {
13733
+ dispatch({
13734
+ type: DISABLE_SUBMIT,
13735
+ payload: false
13736
+ });
13737
+ dispatch({
13738
+ type: LOADING,
13739
+ payload: false
13740
+ });
13741
+
13742
+ if (err) {
13743
+ onFailure(err);
13744
+ return dispatch({
13745
+ type: SHOW_ALERT,
13746
+ payload: {
13747
+ type: "error",
13748
+ content: getErrorMessages(err)
13749
+ }
13750
+ });
13751
+ }
13752
+
13753
+ onSuccess(res);
13754
+ });
13755
+ };
13756
+
13533
13757
  const updatePaymentSource = (state, dispatch) => {
13534
13758
  return stripe.createSource({
13535
13759
  type: "card"
@@ -13604,13 +13828,17 @@ const PaymentMethodContainerWithoutStripe = ({
13604
13828
  source,
13605
13829
  error
13606
13830
  }) => {
13607
- var _ref, _state$updatedPrice, _source$card3;
13831
+ var _ref, _ref2, _state$updatedPrice, _source$card3;
13608
13832
 
13609
13833
  if (error) {
13610
13834
  return handlePaymentError(error);
13611
13835
  }
13612
13836
 
13613
13837
  const getOrderItemsTotal = () => {
13838
+ if (!order) {
13839
+ return null;
13840
+ }
13841
+
13614
13842
  const isQuickPurchase = !Array.isArray(order);
13615
13843
 
13616
13844
  if (isQuickPurchase) {
@@ -13626,7 +13854,7 @@ const PaymentMethodContainerWithoutStripe = ({
13626
13854
  }, 0);
13627
13855
  };
13628
13856
 
13629
- const totalAmount = (_ref = (_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 && _ref !== void 0 ? _ref : getOrderItemsTotal();
13857
+ const totalAmount = (_ref = (_ref2 = (_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 && _ref2 !== void 0 ? _ref2 : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref !== void 0 ? _ref : getOrderItemsTotal();
13630
13858
 
13631
13859
  if ((source === null || source === void 0 ? void 0 : (_source$card3 = source.card) === null || _source$card3 === void 0 ? void 0 : _source$card3.three_d_secure) === "required" && totalAmount > 0) {
13632
13860
  return resolveTaxCalculation().then(res => {
@@ -13659,6 +13887,10 @@ const PaymentMethodContainerWithoutStripe = ({
13659
13887
  const resolveTaxCalculation = () => {
13660
13888
  var _window$Pelcro$site$r2;
13661
13889
 
13890
+ if (type === "invoicePayment") {
13891
+ return new Promise(resolve => resolve());
13892
+ }
13893
+
13662
13894
  const taxesEnabled = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.taxes_enabled;
13663
13895
  return new Promise((resolve, reject) => {
13664
13896
  // resolve early if taxes isn't enabled
@@ -13732,6 +13964,8 @@ const PaymentMethodContainerWithoutStripe = ({
13732
13964
  subscribe(stripeSource, state, dispatch);
13733
13965
  } else if (stripeSource && type === "orderCreate") {
13734
13966
  purchase(stripeSource, state, dispatch);
13967
+ } else if (stripeSource && type === "invoicePayment") {
13968
+ payInvoice(new StripeGateway(), stripeSource.id, dispatch);
13735
13969
  }
13736
13970
  };
13737
13971
 
@@ -13865,7 +14099,13 @@ const PaymentMethodContainerWithoutStripe = ({
13865
14099
  });
13866
14100
 
13867
14101
  case HANDLE_PAYPAL_SUBSCRIPTION:
13868
- return lib_5(state, () => handlePaypalSubscription(state, action.payload));
14102
+ return lib_5(state, (state, dispatch) => {
14103
+ if (type === "invoicePayment") {
14104
+ payInvoice(new PaypalGateway(), action.payload, dispatch);
14105
+ } else {
14106
+ handlePaypalSubscription(state, action.payload);
14107
+ }
14108
+ });
13869
14109
 
13870
14110
  case SET_UPDATED_PRICE:
13871
14111
  return lib_7({ ...state,
@@ -13923,21 +14163,21 @@ const PaymentMethodContainerWithoutStripe = ({
13923
14163
  default:
13924
14164
  return state;
13925
14165
  }
13926
- }, initialState$e);
14166
+ }, initialState$f);
13927
14167
  return /*#__PURE__*/React__default.createElement("div", {
13928
14168
  style: { ...style
13929
14169
  },
13930
14170
  className: `pelcro-container pelcro-payment-container ${className}`
13931
- }, /*#__PURE__*/React__default.createElement(Provider$e, {
14171
+ }, /*#__PURE__*/React__default.createElement(Provider$f, {
13932
14172
  value: {
13933
14173
  state,
13934
14174
  dispatch
13935
14175
  }
13936
14176
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
13937
- store: store$e,
14177
+ store: store$f,
13938
14178
  key: i
13939
14179
  })) : /*#__PURE__*/React__default.cloneElement(children, {
13940
- store: store$e
14180
+ store: store$f
13941
14181
  })));
13942
14182
  };
13943
14183
 
@@ -13959,7 +14199,7 @@ const PaymentMethodContainer = props => {
13959
14199
  stripeAccount: window.Pelcro.site.read().account_id,
13960
14200
  locale: getPageOrDefaultLanguage()
13961
14201
  }, /*#__PURE__*/React__default.createElement(es_11, null, /*#__PURE__*/React__default.createElement(UnwrappedForm, Object.assign({
13962
- store: store$e
14202
+ store: store$f
13963
14203
  }, props))));
13964
14204
  }
13965
14205
 
@@ -14012,7 +14252,7 @@ const PelcroPaymentRequestButton = props => {
14012
14252
  currentPlan,
14013
14253
  updatedPrice
14014
14254
  }
14015
- } = useContext(store$e);
14255
+ } = useContext(store$f);
14016
14256
 
14017
14257
  const updatePaymentRequest = () => {
14018
14258
  // Make sure payment request is up to date, eg. user added a coupon code.
@@ -14072,7 +14312,7 @@ const DiscountedPrice = props => {
14072
14312
  taxAmount,
14073
14313
  percentOff
14074
14314
  }
14075
- } = useContext(store$e);
14315
+ } = useContext(store$f);
14076
14316
  const {
14077
14317
  order,
14078
14318
  plan
@@ -14122,7 +14362,7 @@ const SubmitPaymentMethod = ({
14122
14362
  isLoading,
14123
14363
  updatedPrice
14124
14364
  }
14125
- } = useContext(store$e);
14365
+ } = useContext(store$f);
14126
14366
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
14127
14367
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
14128
14368
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -14143,17 +14383,17 @@ const SubmitPaymentMethod = ({
14143
14383
  }, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
14144
14384
  };
14145
14385
 
14146
- var _path$l;
14386
+ var _path$m;
14147
14387
 
14148
- function _extends$n() { _extends$n = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
14388
+ function _extends$o() { _extends$o = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
14149
14389
 
14150
14390
  function SvgArrowLeft(props) {
14151
- return /*#__PURE__*/React.createElement("svg", _extends$n({
14391
+ return /*#__PURE__*/React.createElement("svg", _extends$o({
14152
14392
  xmlns: "http://www.w3.org/2000/svg",
14153
14393
  fill: "none",
14154
14394
  viewBox: "0 0 24 24",
14155
14395
  stroke: "currentColor"
14156
- }, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
14396
+ }, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
14157
14397
  strokeLinecap: "round",
14158
14398
  strokeLinejoin: "round",
14159
14399
  strokeWidth: 2,
@@ -14172,7 +14412,7 @@ const ApplyCouponButton = ({
14172
14412
  disableCouponButton
14173
14413
  },
14174
14414
  dispatch
14175
- } = useContext(store$e);
14415
+ } = useContext(store$f);
14176
14416
  const {
14177
14417
  t
14178
14418
  } = useTranslation("checkoutForm");
@@ -14206,7 +14446,7 @@ const CouponCodeField = props => {
14206
14446
  couponCode,
14207
14447
  couponError
14208
14448
  }
14209
- } = useContext(store$e);
14449
+ } = useContext(store$f);
14210
14450
 
14211
14451
  const onCouponCodeChange = e => {
14212
14452
  dispatch({
@@ -14235,17 +14475,17 @@ const CouponCodeField = props => {
14235
14475
  }, props));
14236
14476
  };
14237
14477
 
14238
- var _path$k;
14478
+ var _path$l;
14239
14479
 
14240
- function _extends$m() { _extends$m = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
14480
+ function _extends$n() { _extends$n = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
14241
14481
 
14242
14482
  function SvgTicket(props) {
14243
- return /*#__PURE__*/React.createElement("svg", _extends$m({
14483
+ return /*#__PURE__*/React.createElement("svg", _extends$n({
14244
14484
  xmlns: "http://www.w3.org/2000/svg",
14245
14485
  fill: "none",
14246
14486
  viewBox: "0 0 24 24",
14247
14487
  stroke: "currentColor"
14248
- }, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
14488
+ }, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
14249
14489
  strokeLinecap: "round",
14250
14490
  strokeLinejoin: "round",
14251
14491
  strokeWidth: 2,
@@ -14262,7 +14502,7 @@ const CouponCode = ({
14262
14502
  state: {
14263
14503
  enableCouponField
14264
14504
  }
14265
- } = useContext(store$e);
14505
+ } = useContext(store$f);
14266
14506
  const {
14267
14507
  t
14268
14508
  } = useTranslation("checkoutForm");
@@ -14519,17 +14759,18 @@ const PaypalSubscribeButton = props => {
14519
14759
  const {
14520
14760
  dispatch,
14521
14761
  state
14522
- } = useContext(store$e);
14762
+ } = useContext(store$f);
14523
14763
  const {
14524
14764
  product,
14525
14765
  plan,
14766
+ invoice,
14526
14767
  selectedAddressId
14527
14768
  } = usePelcro();
14528
14769
  useEffect(() => {
14529
- var _ref, _state$updatedPrice, _props$plan, _props$selectedAddres;
14770
+ var _ref, _ref2, _state$updatedPrice, _props$plan, _props$selectedAddres;
14530
14771
 
14531
14772
  // sometimes, price is updated. eg. Coupon codes.
14532
- const updatedPrice = (_ref = (_state$updatedPrice = state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : (_props$plan = props.plan) === null || _props$plan === void 0 ? void 0 : _props$plan.amount) !== null && _ref !== void 0 ? _ref : plan.amount;
14773
+ const updatedPrice = (_ref = (_ref2 = (_state$updatedPrice = state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : (_props$plan = props.plan) === null || _props$plan === void 0 ? void 0 : _props$plan.amount) !== null && _ref2 !== void 0 ? _ref2 : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref !== void 0 ? _ref : invoice.amount_remaining;
14533
14774
  const selectedAddress = getAddressById((_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : selectedAddressId); // initialize paypal client, then render paypal button.
14534
14775
 
14535
14776
  const initializePaypal = async () => {
@@ -14538,7 +14779,7 @@ const PaypalSubscribeButton = props => {
14538
14779
  const paypalCheckoutInstance = new PaypalClient({
14539
14780
  buttonElementID: (_props$buttonElementI = props.buttonElementID) !== null && _props$buttonElementI !== void 0 ? _props$buttonElementI : "pelcro-paypal-button",
14540
14781
  style: props.buttonStyle,
14541
- enableShippingAddress: (_props$product$addres = (_props$product = props.product) === null || _props$product === void 0 ? void 0 : _props$product.address_required) !== null && _props$product$addres !== void 0 ? _props$product$addres : product.address_required,
14782
+ enableShippingAddress: (_props$product$addres = (_props$product = props.product) === null || _props$product === void 0 ? void 0 : _props$product.address_required) !== null && _props$product$addres !== void 0 ? _props$product$addres : product === null || product === void 0 ? void 0 : product.address_required,
14542
14783
  shippingAddressEditable: props.makeAddressEditable,
14543
14784
  displayName: props.merchantDisplayName,
14544
14785
  locale: props.locale,
@@ -14548,9 +14789,9 @@ const PaypalSubscribeButton = props => {
14548
14789
  await paypalCheckoutInstance.build(); // Create paypal payment
14549
14790
 
14550
14791
  paypalCheckoutInstance.createPayment({
14551
- product: (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
14792
+ product: invoice ? invoice.plan : (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
14552
14793
  amount: updatedPrice,
14553
- address: selectedAddress,
14794
+ address: invoice ? null : selectedAddress,
14554
14795
  onButtonClick: () => {
14555
14796
  dispatch({
14556
14797
  type: DISABLE_SUBMIT,
@@ -14604,16 +14845,16 @@ const BankRedirection = () => {
14604
14845
  }));
14605
14846
  };
14606
14847
 
14607
- var _path$j;
14848
+ var _path$k;
14608
14849
 
14609
- function _extends$l() { _extends$l = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
14850
+ function _extends$m() { _extends$m = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
14610
14851
 
14611
14852
  function SvgLock(props) {
14612
- return /*#__PURE__*/React.createElement("svg", _extends$l({
14853
+ return /*#__PURE__*/React.createElement("svg", _extends$m({
14613
14854
  xmlns: "http://www.w3.org/2000/svg",
14614
14855
  viewBox: "0 0 20 20",
14615
14856
  fill: "currentColor"
14616
- }, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
14857
+ }, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
14617
14858
  fillRule: "evenodd",
14618
14859
  d: "M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",
14619
14860
  clipRule: "evenodd"
@@ -14630,7 +14871,7 @@ const SelectedPaymentMethod = () => {
14630
14871
  state: {
14631
14872
  isLoading
14632
14873
  }
14633
- } = useContext(store$e);
14874
+ } = useContext(store$f);
14634
14875
  const {
14635
14876
  switchView,
14636
14877
  selectedPaymentMethodId
@@ -14672,7 +14913,7 @@ const TaxAmount = () => {
14672
14913
  state: {
14673
14914
  taxAmount
14674
14915
  }
14675
- } = useContext(store$e);
14916
+ } = useContext(store$f);
14676
14917
  const {
14677
14918
  plan
14678
14919
  } = usePelcro();
@@ -14835,12 +15076,12 @@ function SubscriptionRenewModal({
14835
15076
  }
14836
15077
  SubscriptionRenewModal.viewId = "subscription-renew";
14837
15078
 
14838
- var _path$i;
15079
+ var _path$j;
14839
15080
 
14840
- function _extends$k() { _extends$k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
15081
+ function _extends$l() { _extends$l = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
14841
15082
 
14842
15083
  function SvgGift(props) {
14843
- return /*#__PURE__*/React.createElement("svg", _extends$k({
15084
+ return /*#__PURE__*/React.createElement("svg", _extends$l({
14844
15085
  className: "plc-w-6 plc-h-6 plc-mr-2",
14845
15086
  fill: "none",
14846
15087
  stroke: "currentColor",
@@ -14849,7 +15090,7 @@ function SvgGift(props) {
14849
15090
  strokeWidth: 2,
14850
15091
  viewBox: "0 0 24 24",
14851
15092
  xmlns: "http://www.w3.org/2000/svg"
14852
- }, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
15093
+ }, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
14853
15094
  d: "M20 12v10H4V12M2 7h20v5H2zM12 22V7M12 7H7.5a2.5 2.5 0 010-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z"
14854
15095
  })));
14855
15096
  }
@@ -14887,10 +15128,13 @@ const getCurrentFlow = () => {
14887
15128
  const {
14888
15129
  product,
14889
15130
  giftRecipient,
14890
- giftCode
15131
+ giftCode,
15132
+ invoice
14891
15133
  } = usePelcro.getStore();
14892
15134
 
14893
- if (giftRecipient) {
15135
+ if (invoice) {
15136
+ return "invoicePayment";
15137
+ } else if (giftRecipient) {
14894
15138
  return "giftCreate";
14895
15139
  } else if (giftCode) {
14896
15140
  return "giftRedeem";
@@ -14927,6 +15171,13 @@ const getSuccessContent = i18n => {
14927
15171
  }),
14928
15172
  successTitle: i18n("messages.giftRedeem.title"),
14929
15173
  successContent: i18n("messages.giftRedeem.content")
15174
+ },
15175
+ invoicePayment: {
15176
+ successIcon: /*#__PURE__*/React__default.createElement(SvgCheckSolid, {
15177
+ className: "plc-w-32 plc-my-4 plc-text-green-500"
15178
+ }),
15179
+ successTitle: i18n("messages.invoicePayment.title"),
15180
+ successContent: i18n("messages.invoicePayment.title")
14930
15181
  }
14931
15182
  };
14932
15183
  return wordingDictionary[flow];
@@ -15180,7 +15431,7 @@ class DefaultNewsLetter extends Component {
15180
15431
 
15181
15432
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
15182
15433
 
15183
- const initialState$d = {
15434
+ const initialState$e = {
15184
15435
  didSubToNewslettersBefore: false,
15185
15436
  newsletters: [],
15186
15437
  isListLoading: true,
@@ -15190,10 +15441,10 @@ const initialState$d = {
15190
15441
  content: ""
15191
15442
  }
15192
15443
  };
15193
- const store$d = /*#__PURE__*/createContext(initialState$d);
15444
+ const store$e = /*#__PURE__*/createContext(initialState$e);
15194
15445
  const {
15195
- Provider: Provider$d
15196
- } = store$d;
15446
+ Provider: Provider$e
15447
+ } = store$e;
15197
15448
 
15198
15449
  const NewsletterUpdateContainer = ({
15199
15450
  style,
@@ -15306,7 +15557,7 @@ const NewsletterUpdateContainer = ({
15306
15557
  default:
15307
15558
  return state;
15308
15559
  }
15309
- }, initialState$d);
15560
+ }, initialState$e);
15310
15561
  useEffect(() => {
15311
15562
  const getUserNewsletters = () => {
15312
15563
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -15350,7 +15601,7 @@ const NewsletterUpdateContainer = ({
15350
15601
  style: { ...style
15351
15602
  },
15352
15603
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
15353
- }, /*#__PURE__*/React__default.createElement(Provider$d, {
15604
+ }, /*#__PURE__*/React__default.createElement(Provider$e, {
15354
15605
  value: {
15355
15606
  state,
15356
15607
  dispatch
@@ -15358,12 +15609,12 @@ const NewsletterUpdateContainer = ({
15358
15609
  }, children.length ? children.map((child, i) => {
15359
15610
  if (child) {
15360
15611
  return /*#__PURE__*/React__default.cloneElement(child, {
15361
- store: store$d,
15612
+ store: store$e,
15362
15613
  key: i
15363
15614
  });
15364
15615
  }
15365
15616
  }) : /*#__PURE__*/React__default.cloneElement(children, {
15366
- store: store$d
15617
+ store: store$e
15367
15618
  })));
15368
15619
  };
15369
15620
 
@@ -15378,7 +15629,7 @@ const NewsletterUpdateButton = ({
15378
15629
  isSubmitting,
15379
15630
  isListLoading
15380
15631
  }
15381
- } = useContext(store$d);
15632
+ } = useContext(store$e);
15382
15633
  const {
15383
15634
  t
15384
15635
  } = useTranslation("newsletter");
@@ -15408,7 +15659,7 @@ const NewsletterUpdateList = () => {
15408
15659
  newsletters,
15409
15660
  isListLoading
15410
15661
  }
15411
- } = useContext(store$d);
15662
+ } = useContext(store$e);
15412
15663
 
15413
15664
  if (isListLoading) {
15414
15665
  return /*#__PURE__*/React__default.createElement(Loader, {
@@ -15612,7 +15863,7 @@ function SubscriptionCreateModal({
15612
15863
  SubscriptionCreateModal.viewId = "subscription-create";
15613
15864
 
15614
15865
  var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
15615
- const initialState$c = {
15866
+ const initialState$d = {
15616
15867
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
15617
15868
  firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
15618
15869
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
@@ -15625,10 +15876,10 @@ const initialState$c = {
15625
15876
  content: ""
15626
15877
  }
15627
15878
  };
15628
- const store$c = /*#__PURE__*/createContext(initialState$c);
15879
+ const store$d = /*#__PURE__*/createContext(initialState$d);
15629
15880
  const {
15630
- Provider: Provider$c
15631
- } = store$c;
15881
+ Provider: Provider$d
15882
+ } = store$d;
15632
15883
 
15633
15884
  const UserUpdateContainer = ({
15634
15885
  style,
@@ -15760,27 +16011,27 @@ const UserUpdateContainer = ({
15760
16011
  default:
15761
16012
  return state;
15762
16013
  }
15763
- }, initialState$c);
16014
+ }, initialState$d);
15764
16015
  return /*#__PURE__*/React__default.createElement("div", {
15765
16016
  style: { ...style
15766
16017
  },
15767
16018
  className: `pelcro-container pelcro-user-update-container ${className}`
15768
- }, /*#__PURE__*/React__default.createElement(Provider$c, {
16019
+ }, /*#__PURE__*/React__default.createElement(Provider$d, {
15769
16020
  value: {
15770
16021
  state,
15771
16022
  dispatch
15772
16023
  }
15773
16024
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
15774
- store: store$c,
16025
+ store: store$d,
15775
16026
  key: i
15776
16027
  })) : /*#__PURE__*/React__default.cloneElement(children, {
15777
- store: store$c
16028
+ store: store$d
15778
16029
  })));
15779
16030
  };
15780
16031
 
15781
16032
  const UserUpdateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
15782
16033
  disabled: true,
15783
- store: store$c
16034
+ store: store$d
15784
16035
  }, props));
15785
16036
 
15786
16037
  const UserUpdateButton = ({
@@ -15793,7 +16044,7 @@ const UserUpdateButton = ({
15793
16044
  buttonDisabled
15794
16045
  },
15795
16046
  dispatch
15796
- } = useContext(store$c);
16047
+ } = useContext(store$d);
15797
16048
  const {
15798
16049
  t
15799
16050
  } = useTranslation("userEdit");
@@ -15810,11 +16061,11 @@ const UserUpdateButton = ({
15810
16061
  };
15811
16062
 
15812
16063
  const UserUpdateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
15813
- store: store$c
16064
+ store: store$d
15814
16065
  }, props));
15815
16066
 
15816
16067
  const UserUpdateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
15817
- store: store$c
16068
+ store: store$d
15818
16069
  }, props));
15819
16070
 
15820
16071
  function Phone({
@@ -15843,22 +16094,22 @@ function Phone({
15843
16094
  }
15844
16095
 
15845
16096
  const UserUpdatePhone = props => /*#__PURE__*/React__default.createElement(Phone, Object.assign({
15846
- store: store$c
16097
+ store: store$d
15847
16098
  }, props));
15848
16099
 
15849
16100
  var userSolidIcon = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22plc-h-5%20plc-w-5%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22white%22%3E%20%20%3Cpath%20transform%3D%22translate%280%2C2%29%22%20fill-rule%3D%22evenodd%22%20d%3D%22M10%209a3%203%200%20100-6%203%203%200%20000%206zm-7%209a7%207%200%201114%200H3z%22%20clip-rule%3D%22evenodd%22%20%2F%3E%3C%2Fsvg%3E";
15850
16101
 
15851
- var _path$h;
16102
+ var _path$i;
15852
16103
 
15853
- function _extends$j() { _extends$j = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
16104
+ function _extends$k() { _extends$k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
15854
16105
 
15855
16106
  function SvgEdit(props) {
15856
- return /*#__PURE__*/React.createElement("svg", _extends$j({
16107
+ return /*#__PURE__*/React.createElement("svg", _extends$k({
15857
16108
  className: "plc-w-6 plc-h-6",
15858
16109
  xmlns: "http://www.w3.org/2000/svg",
15859
16110
  viewBox: "0 0 20 20",
15860
16111
  fill: "currentColor"
15861
- }, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
16112
+ }, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
15862
16113
  d: "M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zm-2.207 2.207L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"
15863
16114
  })));
15864
16115
  }
@@ -15990,16 +16241,16 @@ function DisplayName({
15990
16241
  }
15991
16242
 
15992
16243
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
15993
- store: store$c
16244
+ store: store$d
15994
16245
  }, props));
15995
16246
 
15996
16247
  const UserUpdateTextInput = props => {
15997
16248
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
15998
- store: store$c
16249
+ store: store$d
15999
16250
  }));
16000
16251
  };
16001
16252
 
16002
- const initialState$b = {
16253
+ const initialState$c = {
16003
16254
  isSubmitting: false,
16004
16255
  firstName: "",
16005
16256
  firstNameError: "",
@@ -16024,10 +16275,10 @@ const initialState$b = {
16024
16275
  content: ""
16025
16276
  }
16026
16277
  };
16027
- const store$b = /*#__PURE__*/createContext(initialState$b);
16278
+ const store$c = /*#__PURE__*/createContext(initialState$c);
16028
16279
  const {
16029
- Provider: Provider$b
16030
- } = store$b;
16280
+ Provider: Provider$c
16281
+ } = store$c;
16031
16282
 
16032
16283
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
16033
16284
 
@@ -16234,7 +16485,7 @@ const AddressCreateContainer = ({
16234
16485
  default:
16235
16486
  return state;
16236
16487
  }
16237
- }, initialState$b);
16488
+ }, initialState$c);
16238
16489
  useEffect(() => {
16239
16490
  const getStates = () => {
16240
16491
  dispatch({
@@ -16266,16 +16517,16 @@ const AddressCreateContainer = ({
16266
16517
  style: { ...style
16267
16518
  },
16268
16519
  className: `pelcro-container pelcro-address-create-container ${className}`
16269
- }, /*#__PURE__*/React__default.createElement(Provider$b, {
16520
+ }, /*#__PURE__*/React__default.createElement(Provider$c, {
16270
16521
  value: {
16271
16522
  state,
16272
16523
  dispatch
16273
16524
  }
16274
16525
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
16275
- store: store$b,
16526
+ store: store$c,
16276
16527
  key: i
16277
16528
  })) : /*#__PURE__*/React__default.cloneElement(children, {
16278
- store: store$b
16529
+ store: store$c
16279
16530
  })));
16280
16531
  };
16281
16532
 
@@ -16286,7 +16537,7 @@ function AddressCreateFirstName(props) {
16286
16537
  firstName,
16287
16538
  firstNameError
16288
16539
  }
16289
- } = useContext(store$b);
16540
+ } = useContext(store$c);
16290
16541
 
16291
16542
  const handleBlur = () => {
16292
16543
  return dispatch({
@@ -16329,7 +16580,7 @@ function AddressCreateLastName(props) {
16329
16580
  lastName,
16330
16581
  lastNameError
16331
16582
  }
16332
- } = useContext(store$b);
16583
+ } = useContext(store$c);
16333
16584
 
16334
16585
  const handleBlur = () => {
16335
16586
  return dispatch({
@@ -16372,7 +16623,7 @@ function AddressCreateLine1(props) {
16372
16623
  line1,
16373
16624
  line1Error
16374
16625
  }
16375
- } = useContext(store$b);
16626
+ } = useContext(store$c);
16376
16627
 
16377
16628
  const handleBlur = () => {
16378
16629
  return dispatch({
@@ -16415,7 +16666,7 @@ function AddressCreateCity(props) {
16415
16666
  city,
16416
16667
  cityError
16417
16668
  }
16418
- } = useContext(store$b);
16669
+ } = useContext(store$c);
16419
16670
 
16420
16671
  const handleBlur = () => {
16421
16672
  return dispatch({
@@ -16458,7 +16709,7 @@ function AddressCreatePostalCode(props) {
16458
16709
  postalCode,
16459
16710
  postalCodeError
16460
16711
  }
16461
- } = useContext(store$b);
16712
+ } = useContext(store$c);
16462
16713
 
16463
16714
  const handleBlur = () => {
16464
16715
  return dispatch({
@@ -16504,7 +16755,7 @@ const AddressCreateSubmit = ({
16504
16755
  state: {
16505
16756
  isSubmitting
16506
16757
  }
16507
- } = useContext(store$b);
16758
+ } = useContext(store$c);
16508
16759
  const {
16509
16760
  t
16510
16761
  } = useTranslation("address");
@@ -16615,7 +16866,7 @@ function CountrySelect({
16615
16866
  }
16616
16867
 
16617
16868
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
16618
- store: store$b
16869
+ store: store$c
16619
16870
  }, props));
16620
16871
 
16621
16872
  function StateSelect({
@@ -16703,7 +16954,7 @@ function StateSelect({
16703
16954
  }
16704
16955
 
16705
16956
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
16706
- store: store$b
16957
+ store: store$c
16707
16958
  }, props));
16708
16959
 
16709
16960
  const AddressCreateView = props => {
@@ -16808,18 +17059,18 @@ AddressCreateModal.viewId = "address-create";
16808
17059
 
16809
17060
  const AddressCreateTextInput = props => {
16810
17061
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
16811
- store: store$b
17062
+ store: store$c
16812
17063
  }));
16813
17064
  };
16814
17065
 
16815
17066
  const AddressCreateLine2 = props => {
16816
17067
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
16817
17068
  fieldName: "line2",
16818
- store: store$b
17069
+ store: store$c
16819
17070
  }, props));
16820
17071
  };
16821
17072
 
16822
- const initialState$a = {
17073
+ const initialState$b = {
16823
17074
  isSubmitting: false,
16824
17075
  firstName: "",
16825
17076
  firstNameError: "",
@@ -16844,10 +17095,10 @@ const initialState$a = {
16844
17095
  content: ""
16845
17096
  }
16846
17097
  };
16847
- const store$a = /*#__PURE__*/createContext(initialState$a);
17098
+ const store$b = /*#__PURE__*/createContext(initialState$b);
16848
17099
  const {
16849
- Provider: Provider$a
16850
- } = store$a;
17100
+ Provider: Provider$b
17101
+ } = store$b;
16851
17102
 
16852
17103
  const AddressUpdateContainer = ({
16853
17104
  style,
@@ -16899,7 +17150,7 @@ const AddressUpdateContainer = ({
16899
17150
  const thisAddress = addresses[address];
16900
17151
 
16901
17152
  if (+thisAddress.id === +addressId) {
16902
- const newState = { ...initialState$a,
17153
+ const newState = { ...initialState$b,
16903
17154
  firstName: thisAddress.first_name,
16904
17155
  lastName: thisAddress.last_name,
16905
17156
  line1: thisAddress.line1,
@@ -17032,7 +17283,7 @@ const AddressUpdateContainer = ({
17032
17283
  default:
17033
17284
  return state;
17034
17285
  }
17035
- }, initialState$a);
17286
+ }, initialState$b);
17036
17287
  useEffect(() => {
17037
17288
  const getStates = () => {
17038
17289
  dispatch({
@@ -17064,21 +17315,21 @@ const AddressUpdateContainer = ({
17064
17315
  style: { ...style
17065
17316
  },
17066
17317
  className: `pelcro-container pelcro-address-update-container ${className}`
17067
- }, /*#__PURE__*/React__default.createElement(Provider$a, {
17318
+ }, /*#__PURE__*/React__default.createElement(Provider$b, {
17068
17319
  value: {
17069
17320
  state,
17070
17321
  dispatch
17071
17322
  }
17072
17323
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
17073
- store: store$a,
17324
+ store: store$b,
17074
17325
  key: i
17075
17326
  })) : /*#__PURE__*/React__default.cloneElement(children, {
17076
- store: store$a
17327
+ store: store$b
17077
17328
  })));
17078
17329
  };
17079
17330
 
17080
17331
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
17081
- store: store$a
17332
+ store: store$b
17082
17333
  }, props));
17083
17334
 
17084
17335
  function AddressUpdateFirstName(props) {
@@ -17088,7 +17339,7 @@ function AddressUpdateFirstName(props) {
17088
17339
  firstName,
17089
17340
  firstNameError
17090
17341
  }
17091
- } = useContext(store$a);
17342
+ } = useContext(store$b);
17092
17343
 
17093
17344
  const handleBlur = () => {
17094
17345
  return dispatch({
@@ -17131,7 +17382,7 @@ function AddressUpdateLastName(props) {
17131
17382
  lastName,
17132
17383
  lastNameError
17133
17384
  }
17134
- } = useContext(store$a);
17385
+ } = useContext(store$b);
17135
17386
 
17136
17387
  const handleBlur = () => {
17137
17388
  return dispatch({
@@ -17174,7 +17425,7 @@ function AddressUpdateLine1(props) {
17174
17425
  line1,
17175
17426
  line1Error
17176
17427
  }
17177
- } = useContext(store$a);
17428
+ } = useContext(store$b);
17178
17429
 
17179
17430
  const handleBlur = () => {
17180
17431
  return dispatch({
@@ -17214,7 +17465,7 @@ const AddressUpdateLine2 = props => {
17214
17465
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
17215
17466
  fieldName: "line2"
17216
17467
  }, props, {
17217
- store: store$a
17468
+ store: store$b
17218
17469
  }));
17219
17470
  };
17220
17471
 
@@ -17225,7 +17476,7 @@ function AddressUpdateCity(props) {
17225
17476
  city,
17226
17477
  cityError
17227
17478
  }
17228
- } = useContext(store$a);
17479
+ } = useContext(store$b);
17229
17480
 
17230
17481
  const handleBlur = () => {
17231
17482
  return dispatch({
@@ -17268,7 +17519,7 @@ function AddressUpdatePostalCode(props) {
17268
17519
  postalCode,
17269
17520
  postalCodeError
17270
17521
  }
17271
- } = useContext(store$a);
17522
+ } = useContext(store$b);
17272
17523
 
17273
17524
  const handleBlur = () => {
17274
17525
  return dispatch({
@@ -17314,7 +17565,7 @@ const AddressUpdateSubmit = ({
17314
17565
  state: {
17315
17566
  isSubmitting
17316
17567
  }
17317
- } = useContext(store$a);
17568
+ } = useContext(store$b);
17318
17569
  const {
17319
17570
  t
17320
17571
  } = useTranslation("address");
@@ -17330,7 +17581,7 @@ const AddressUpdateSubmit = ({
17330
17581
  };
17331
17582
 
17332
17583
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
17333
- store: store$a
17584
+ store: store$b
17334
17585
  }, props));
17335
17586
 
17336
17587
  const AddressUpdateView = props => {
@@ -17413,7 +17664,7 @@ AddressUpdateModal.viewId = "address-edit";
17413
17664
 
17414
17665
  const AddressUpdateTextInput = props => {
17415
17666
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
17416
- store: store$a
17667
+ store: store$b
17417
17668
  }));
17418
17669
  };
17419
17670
 
@@ -17496,7 +17747,7 @@ const PaymentMethodUpdateModal = props => {
17496
17747
  };
17497
17748
  PaymentMethodUpdateModal.viewId = "payment-method-update";
17498
17749
 
17499
- const initialState$9 = {
17750
+ const initialState$a = {
17500
17751
  email: "",
17501
17752
  password: "",
17502
17753
  passwordError: null,
@@ -17509,10 +17760,10 @@ const initialState$9 = {
17509
17760
  content: ""
17510
17761
  }
17511
17762
  };
17512
- const store$9 = /*#__PURE__*/createContext(initialState$9);
17763
+ const store$a = /*#__PURE__*/createContext(initialState$a);
17513
17764
  const {
17514
- Provider: Provider$9
17515
- } = store$9;
17765
+ Provider: Provider$a
17766
+ } = store$a;
17516
17767
 
17517
17768
  const PasswordResetContainer = ({
17518
17769
  style,
@@ -17569,7 +17820,7 @@ const PasswordResetContainer = ({
17569
17820
  type: SET_EMAIL,
17570
17821
  payload: window.Pelcro.helpers.getURLParameter("email")
17571
17822
  });
17572
- initialState$9.email = window.Pelcro.helpers.getURLParameter("email");
17823
+ initialState$a.email = window.Pelcro.helpers.getURLParameter("email");
17573
17824
  dispatch({
17574
17825
  type: SET_TOKEN,
17575
17826
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -17629,26 +17880,26 @@ const PasswordResetContainer = ({
17629
17880
  default:
17630
17881
  return state;
17631
17882
  }
17632
- }, initialState$9);
17883
+ }, initialState$a);
17633
17884
  return /*#__PURE__*/React__default.createElement("div", {
17634
17885
  style: { ...style
17635
17886
  },
17636
17887
  className: `pelcro-container pelcro-password-reset-container ${className}`
17637
- }, /*#__PURE__*/React__default.createElement(Provider$9, {
17888
+ }, /*#__PURE__*/React__default.createElement(Provider$a, {
17638
17889
  value: {
17639
17890
  state,
17640
17891
  dispatch
17641
17892
  }
17642
17893
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
17643
- store: store$9,
17894
+ store: store$a,
17644
17895
  key: i
17645
17896
  })) : /*#__PURE__*/React__default.cloneElement(children, {
17646
- store: store$9
17897
+ store: store$a
17647
17898
  })));
17648
17899
  };
17649
17900
 
17650
17901
  const PasswordResetPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
17651
- store: store$9
17902
+ store: store$a
17652
17903
  }, props));
17653
17904
 
17654
17905
  const PasswordResetButton = ({
@@ -17661,7 +17912,7 @@ const PasswordResetButton = ({
17661
17912
  buttonDisabled
17662
17913
  },
17663
17914
  dispatch
17664
- } = useContext(store$9);
17915
+ } = useContext(store$a);
17665
17916
  const {
17666
17917
  t
17667
17918
  } = useTranslation("passwordReset");
@@ -17678,14 +17929,14 @@ const PasswordResetButton = ({
17678
17929
  };
17679
17930
 
17680
17931
  const PasswordResetEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
17681
- store: store$9
17932
+ store: store$a
17682
17933
  }, props, {
17683
17934
  value: window.Pelcro.helpers.getURLParameter("email"),
17684
17935
  disabled: true
17685
17936
  }));
17686
17937
 
17687
17938
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default.createElement(ConfirmPassword, Object.assign({
17688
- store: store$9
17939
+ store: store$a
17689
17940
  }, props));
17690
17941
 
17691
17942
  const PasswordResetView = props => {
@@ -17737,7 +17988,7 @@ const PasswordResetModal = ({
17737
17988
  };
17738
17989
  PasswordResetModal.viewId = "password-reset";
17739
17990
 
17740
- const initialState$8 = {
17991
+ const initialState$9 = {
17741
17992
  email: "",
17742
17993
  emailError: null,
17743
17994
  buttonDisabled: false,
@@ -17746,10 +17997,10 @@ const initialState$8 = {
17746
17997
  content: ""
17747
17998
  }
17748
17999
  };
17749
- const store$8 = /*#__PURE__*/createContext(initialState$8);
18000
+ const store$9 = /*#__PURE__*/createContext(initialState$9);
17750
18001
  const {
17751
- Provider: Provider$8
17752
- } = store$8;
18002
+ Provider: Provider$9
18003
+ } = store$9;
17753
18004
 
17754
18005
  const PasswordForgotContainer = ({
17755
18006
  style,
@@ -17827,21 +18078,21 @@ const PasswordForgotContainer = ({
17827
18078
  default:
17828
18079
  return state;
17829
18080
  }
17830
- }, initialState$8);
18081
+ }, initialState$9);
17831
18082
  return /*#__PURE__*/React__default.createElement("div", {
17832
18083
  style: { ...style
17833
18084
  },
17834
18085
  className: `pelcro-container pelcro-password-forgot-container ${className}`
17835
- }, /*#__PURE__*/React__default.createElement(Provider$8, {
18086
+ }, /*#__PURE__*/React__default.createElement(Provider$9, {
17836
18087
  value: {
17837
18088
  state,
17838
18089
  dispatch
17839
18090
  }
17840
18091
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
17841
- store: store$8,
18092
+ store: store$9,
17842
18093
  key: i
17843
18094
  })) : /*#__PURE__*/React__default.cloneElement(children, {
17844
- store: store$8
18095
+ store: store$9
17845
18096
  })));
17846
18097
  };
17847
18098
 
@@ -17857,7 +18108,7 @@ const PasswordForgotButton = ({
17857
18108
  emailError
17858
18109
  },
17859
18110
  dispatch
17860
- } = useContext(store$8);
18111
+ } = useContext(store$9);
17861
18112
  const {
17862
18113
  t
17863
18114
  } = useTranslation("passwordForgot");
@@ -17878,7 +18129,7 @@ const PasswordForgotButton = ({
17878
18129
  };
17879
18130
 
17880
18131
  const PasswordForgotEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
17881
- store: store$8
18132
+ store: store$9
17882
18133
  }, props));
17883
18134
 
17884
18135
  const PasswordForgotView = props => {
@@ -17928,7 +18179,7 @@ const PasswordForgotModal = ({
17928
18179
  };
17929
18180
  PasswordForgotModal.viewId = "password-forgot";
17930
18181
 
17931
- const initialState$7 = {
18182
+ const initialState$8 = {
17932
18183
  currentPassword: "",
17933
18184
  newPassword: "",
17934
18185
  confirmNewPassword: "",
@@ -17942,10 +18193,10 @@ const initialState$7 = {
17942
18193
  content: ""
17943
18194
  }
17944
18195
  };
17945
- const store$7 = /*#__PURE__*/createContext(initialState$7);
18196
+ const store$8 = /*#__PURE__*/createContext(initialState$8);
17946
18197
  const {
17947
- Provider: Provider$7
17948
- } = store$7;
18198
+ Provider: Provider$8
18199
+ } = store$8;
17949
18200
  const PasswordChangeContainer = ({
17950
18201
  style,
17951
18202
  className = "",
@@ -18097,21 +18348,21 @@ const PasswordChangeContainer = ({
18097
18348
  default:
18098
18349
  return state;
18099
18350
  }
18100
- }, initialState$7);
18351
+ }, initialState$8);
18101
18352
  return /*#__PURE__*/React__default.createElement("div", {
18102
18353
  style: { ...style
18103
18354
  },
18104
18355
  className: `pelcro-container pelcro-password-change-container ${className}`
18105
- }, /*#__PURE__*/React__default.createElement(Provider$7, {
18356
+ }, /*#__PURE__*/React__default.createElement(Provider$8, {
18106
18357
  value: {
18107
18358
  state,
18108
18359
  dispatch
18109
18360
  }
18110
18361
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18111
- store: store$7,
18362
+ store: store$8,
18112
18363
  key: i
18113
18364
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18114
- store: store$7
18365
+ store: store$8
18115
18366
  })));
18116
18367
  };
18117
18368
 
@@ -18122,7 +18373,7 @@ function PasswordChangeCurrentPassword(props) {
18122
18373
  currentPassword,
18123
18374
  currentPasswordError
18124
18375
  }
18125
- } = useContext(store$7);
18376
+ } = useContext(store$8);
18126
18377
  const handleBlur = useCallback(() => {
18127
18378
  return dispatch({
18128
18379
  type: VALIDATE_PASSWORD
@@ -18156,7 +18407,7 @@ function PasswordChangeNewPassword(props) {
18156
18407
  newPassword,
18157
18408
  newPasswordError
18158
18409
  }
18159
- } = useContext(store$7);
18410
+ } = useContext(store$8);
18160
18411
  const handleBlur = useCallback(() => {
18161
18412
  return dispatch({
18162
18413
  type: VALIDATE_NEW_PASSWORD
@@ -18190,7 +18441,7 @@ function PasswordChangeConfirmNewPassword(props) {
18190
18441
  confirmNewPassword,
18191
18442
  confirmNewPasswordError
18192
18443
  }
18193
- } = useContext(store$7);
18444
+ } = useContext(store$8);
18194
18445
  const handleBlur = useCallback(() => {
18195
18446
  return dispatch({
18196
18447
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -18231,7 +18482,7 @@ const PasswordChangeButton = ({
18231
18482
  confirmNewPasswordError
18232
18483
  },
18233
18484
  dispatch
18234
- } = useContext(store$7);
18485
+ } = useContext(store$8);
18235
18486
  const {
18236
18487
  t
18237
18488
  } = useTranslation("passwordChange");
@@ -18297,17 +18548,17 @@ const PasswordChangeModal = ({
18297
18548
  };
18298
18549
  PasswordChangeModal.viewId = "password-change";
18299
18550
 
18300
- const initialState$6 = {
18551
+ const initialState$7 = {
18301
18552
  buttonDisabled: false,
18302
18553
  alert: {
18303
18554
  type: "error",
18304
18555
  content: ""
18305
18556
  }
18306
18557
  };
18307
- const store$6 = /*#__PURE__*/createContext(initialState$6);
18558
+ const store$7 = /*#__PURE__*/createContext(initialState$7);
18308
18559
  const {
18309
- Provider: Provider$6
18310
- } = store$6;
18560
+ Provider: Provider$7
18561
+ } = store$7;
18311
18562
 
18312
18563
  const CartContainer = ({
18313
18564
  style,
@@ -18398,21 +18649,21 @@ const CartContainer = ({
18398
18649
  default:
18399
18650
  return state;
18400
18651
  }
18401
- }, initialState$6);
18652
+ }, initialState$7);
18402
18653
  return /*#__PURE__*/React__default.createElement("div", {
18403
18654
  style: { ...style
18404
18655
  },
18405
18656
  className: `pelcro-container pelcro-cart-container ${className}`
18406
- }, /*#__PURE__*/React__default.createElement(Provider$6, {
18657
+ }, /*#__PURE__*/React__default.createElement(Provider$7, {
18407
18658
  value: {
18408
18659
  state,
18409
18660
  dispatch
18410
18661
  }
18411
18662
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18412
- store: store$6,
18663
+ store: store$7,
18413
18664
  key: i
18414
18665
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18415
- store: store$6
18666
+ store: store$7
18416
18667
  })));
18417
18668
  };
18418
18669
 
@@ -18449,7 +18700,7 @@ const CartSubmit = ({
18449
18700
  buttonDisabled
18450
18701
  },
18451
18702
  dispatch
18452
- } = useContext(store$6);
18703
+ } = useContext(store$7);
18453
18704
  const {
18454
18705
  t
18455
18706
  } = useTranslation("cart");
@@ -18480,7 +18731,7 @@ const CartTotalPrice = () => {
18480
18731
  state: {
18481
18732
  alert
18482
18733
  }
18483
- } = useContext(store$6);
18734
+ } = useContext(store$7);
18484
18735
  const {
18485
18736
  cartItems
18486
18737
  } = usePelcro();
@@ -18793,7 +19044,7 @@ const OrderConfirmModal = props => {
18793
19044
  };
18794
19045
  OrderConfirmModal.viewId = "order-confirm";
18795
19046
 
18796
- const initialState$5 = {
19047
+ const initialState$6 = {
18797
19048
  email: "",
18798
19049
  firstName: "",
18799
19050
  lastName: "",
@@ -18805,10 +19056,10 @@ const initialState$5 = {
18805
19056
  content: ""
18806
19057
  }
18807
19058
  };
18808
- const store$5 = /*#__PURE__*/createContext(initialState$5);
19059
+ const store$6 = /*#__PURE__*/createContext(initialState$6);
18809
19060
  const {
18810
- Provider: Provider$5
18811
- } = store$5;
19061
+ Provider: Provider$6
19062
+ } = store$6;
18812
19063
 
18813
19064
  const GiftCreateContainer = ({
18814
19065
  style,
@@ -18912,21 +19163,21 @@ const GiftCreateContainer = ({
18912
19163
  default:
18913
19164
  return state;
18914
19165
  }
18915
- }, initialState$5);
19166
+ }, initialState$6);
18916
19167
  return /*#__PURE__*/React__default.createElement("div", {
18917
19168
  style: { ...style
18918
19169
  },
18919
19170
  className: `pelcro-container pelcro-gift-create-container ${className}`
18920
- }, /*#__PURE__*/React__default.createElement(Provider$5, {
19171
+ }, /*#__PURE__*/React__default.createElement(Provider$6, {
18921
19172
  value: {
18922
19173
  state,
18923
19174
  dispatch
18924
19175
  }
18925
19176
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18926
- store: store$5,
19177
+ store: store$6,
18927
19178
  key: i
18928
19179
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18929
- store: store$5
19180
+ store: store$6
18930
19181
  })));
18931
19182
  };
18932
19183
 
@@ -18940,7 +19191,7 @@ const GiftCreateSubmitButton = ({
18940
19191
  state: {
18941
19192
  disableSubmit
18942
19193
  }
18943
- } = useContext(store$5);
19194
+ } = useContext(store$6);
18944
19195
  const {
18945
19196
  t
18946
19197
  } = useTranslation("register");
@@ -18957,29 +19208,29 @@ const GiftCreateSubmitButton = ({
18957
19208
 
18958
19209
  const GiftCreateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
18959
19210
  initWithUserEmail: false,
18960
- store: store$5
19211
+ store: store$6
18961
19212
  }, props));
18962
19213
 
18963
19214
  const GiftCreateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
18964
- store: store$5
19215
+ store: store$6
18965
19216
  }, props));
18966
19217
 
18967
19218
  const GiftCreateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
18968
- store: store$5
19219
+ store: store$6
18969
19220
  }, props));
18970
19221
 
18971
- var _path$g;
19222
+ var _path$h;
18972
19223
 
18973
- function _extends$i() { _extends$i = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$i.apply(this, arguments); }
19224
+ function _extends$j() { _extends$j = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
18974
19225
 
18975
19226
  function SvgInfoCircle(props) {
18976
- return /*#__PURE__*/React.createElement("svg", _extends$i({
19227
+ return /*#__PURE__*/React.createElement("svg", _extends$j({
18977
19228
  xmlns: "http://www.w3.org/2000/svg",
18978
19229
  className: "plc-w-5 plc-h-5",
18979
19230
  fill: "none",
18980
19231
  viewBox: "0 0 24 24",
18981
19232
  stroke: "currentColor"
18982
- }, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
19233
+ }, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
18983
19234
  strokeLinecap: "round",
18984
19235
  strokeLinejoin: "round",
18985
19236
  strokeWidth: 2,
@@ -19050,7 +19301,7 @@ const GiftCreateStartDate = props => {
19050
19301
  const {
19051
19302
  dispatch,
19052
19303
  state
19053
- } = useContext(store$5);
19304
+ } = useContext(store$6);
19054
19305
 
19055
19306
  const handleInputChange = value => {
19056
19307
  dispatch({
@@ -19115,13 +19366,17 @@ function TextArea({
19115
19366
  */
19116
19367
 
19117
19368
  function GiftCreateMessage(props) {
19369
+ var _ref, _state$giftMessage;
19370
+
19118
19371
  const {
19119
19372
  t
19120
19373
  } = useTranslation("register");
19121
19374
  const {
19122
19375
  dispatch,
19123
19376
  state
19124
- } = useContext(store$5);
19377
+ } = useContext(store$6);
19378
+ const MAX_CHARS_COUNT = 200;
19379
+ const remainingCharsCount = (_ref = MAX_CHARS_COUNT - ((_state$giftMessage = state.giftMessage) === null || _state$giftMessage === void 0 ? void 0 : _state$giftMessage.length)) !== null && _ref !== void 0 ? _ref : 0;
19125
19380
 
19126
19381
  const handleInputChange = value => {
19127
19382
  dispatch({
@@ -19139,6 +19394,9 @@ function GiftCreateMessage(props) {
19139
19394
  value: state.giftMessage,
19140
19395
  maxLength: "200",
19141
19396
  rows: 3,
19397
+ label: t("gift.labels.giftMessage", {
19398
+ count: remainingCharsCount
19399
+ }),
19142
19400
  tooltipText: t("gift.messages.giftMessageInfo")
19143
19401
  }, props));
19144
19402
  }
@@ -19188,8 +19446,7 @@ const GiftCreateView = props => {
19188
19446
  }, /*#__PURE__*/React__default.createElement(GiftCreateMessage, {
19189
19447
  autoComplete: "gift-message",
19190
19448
  id: "pelcro-input-gift-message",
19191
- errorId: "pelcro-input-gift-message-error",
19192
- label: t("gift.labels.giftMessage")
19449
+ errorId: "pelcro-input-gift-message-error"
19193
19450
  })), /*#__PURE__*/React__default.createElement("p", {
19194
19451
  className: "plc-text-gray-900 pelcro-footnote"
19195
19452
  }, "* ", t("gift.labels.required")), /*#__PURE__*/React__default.createElement(GiftCreateSubmitButton, {
@@ -19241,7 +19498,7 @@ const GiftCreateModal = ({
19241
19498
  };
19242
19499
  GiftCreateModal.viewId = "gift-create";
19243
19500
 
19244
- const initialState$4 = {
19501
+ const initialState$5 = {
19245
19502
  giftCode: "",
19246
19503
  buttonDisabled: true,
19247
19504
  alert: {
@@ -19249,10 +19506,10 @@ const initialState$4 = {
19249
19506
  content: ""
19250
19507
  }
19251
19508
  };
19252
- const store$4 = /*#__PURE__*/createContext(initialState$4);
19509
+ const store$5 = /*#__PURE__*/createContext(initialState$5);
19253
19510
  const {
19254
- Provider: Provider$4
19255
- } = store$4;
19511
+ Provider: Provider$5
19512
+ } = store$5;
19256
19513
 
19257
19514
  const GiftRedeemContainer = ({
19258
19515
  style,
@@ -19317,21 +19574,21 @@ const GiftRedeemContainer = ({
19317
19574
  default:
19318
19575
  return state;
19319
19576
  }
19320
- }, initialState$4);
19577
+ }, initialState$5);
19321
19578
  return /*#__PURE__*/React__default.createElement("div", {
19322
19579
  style: { ...style
19323
19580
  },
19324
19581
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
19325
- }, /*#__PURE__*/React__default.createElement(Provider$4, {
19582
+ }, /*#__PURE__*/React__default.createElement(Provider$5, {
19326
19583
  value: {
19327
19584
  state,
19328
19585
  dispatch
19329
19586
  }
19330
19587
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19331
- store: store$4,
19588
+ store: store$5,
19332
19589
  key: i
19333
19590
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19334
- store: store$4
19591
+ store: store$5
19335
19592
  })));
19336
19593
  };
19337
19594
 
@@ -19368,7 +19625,7 @@ function GiftCode({
19368
19625
  }
19369
19626
 
19370
19627
  const GiftRedeemCode = props => /*#__PURE__*/React__default.createElement(GiftCode, Object.assign({
19371
- store: store$4
19628
+ store: store$5
19372
19629
  }, props));
19373
19630
 
19374
19631
  const GiftRedeemSubmitButton = ({
@@ -19381,7 +19638,7 @@ const GiftRedeemSubmitButton = ({
19381
19638
  state: {
19382
19639
  disableSubmit
19383
19640
  }
19384
- } = useContext(store$4);
19641
+ } = useContext(store$5);
19385
19642
  const {
19386
19643
  t
19387
19644
  } = useTranslation("register");
@@ -19474,7 +19731,7 @@ const moveDefaultAddressToStart = addresses => {
19474
19731
  return [defaultAddress, ...addressesWithoutDefault];
19475
19732
  };
19476
19733
 
19477
- const initialState$3 = {
19734
+ const initialState$4 = {
19478
19735
  addresses: [],
19479
19736
  selectedAddressId: null,
19480
19737
  isSubmitting: false,
@@ -19483,10 +19740,10 @@ const initialState$3 = {
19483
19740
  content: ""
19484
19741
  }
19485
19742
  };
19486
- const store$3 = /*#__PURE__*/createContext(initialState$3);
19743
+ const store$4 = /*#__PURE__*/createContext(initialState$4);
19487
19744
  const {
19488
- Provider: Provider$3
19489
- } = store$3;
19745
+ Provider: Provider$4
19746
+ } = store$4;
19490
19747
 
19491
19748
  const AddressSelectContainer = ({
19492
19749
  style,
@@ -19581,7 +19838,7 @@ const AddressSelectContainer = ({
19581
19838
  default:
19582
19839
  return state;
19583
19840
  }
19584
- }, initialState$3);
19841
+ }, initialState$4);
19585
19842
  useEffect(() => {
19586
19843
  var _window$Pelcro$user$r;
19587
19844
 
@@ -19594,16 +19851,16 @@ const AddressSelectContainer = ({
19594
19851
  style: { ...style
19595
19852
  },
19596
19853
  className: `pelcro-container pelcro-address-select-container ${className}`
19597
- }, /*#__PURE__*/React__default.createElement(Provider$3, {
19854
+ }, /*#__PURE__*/React__default.createElement(Provider$4, {
19598
19855
  value: {
19599
19856
  state,
19600
19857
  dispatch
19601
19858
  }
19602
19859
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19603
- store: store$3,
19860
+ store: store$4,
19604
19861
  key: i
19605
19862
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19606
- store: store$3
19863
+ store: store$4
19607
19864
  })));
19608
19865
  };
19609
19866
 
@@ -19614,7 +19871,7 @@ const AddressSelectList = () => {
19614
19871
  addresses,
19615
19872
  selectedAddressId
19616
19873
  }
19617
- } = useContext(store$3);
19874
+ } = useContext(store$4);
19618
19875
 
19619
19876
  const handleAddressSelect = event => {
19620
19877
  dispatch({
@@ -19658,7 +19915,7 @@ const AddressSelectSubmit = ({
19658
19915
  selectedAddressId,
19659
19916
  isSubmitting
19660
19917
  }
19661
- } = useContext(store$3);
19918
+ } = useContext(store$4);
19662
19919
  const {
19663
19920
  t
19664
19921
  } = useTranslation("address");
@@ -19754,7 +20011,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
19754
20011
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
19755
20012
  };
19756
20013
 
19757
- const initialState$2 = {
20014
+ const initialState$3 = {
19758
20015
  paymentMethods: [],
19759
20016
  selectedPaymentMethodId: null,
19760
20017
  isSubmitting: false,
@@ -19763,10 +20020,10 @@ const initialState$2 = {
19763
20020
  content: ""
19764
20021
  }
19765
20022
  };
19766
- const store$2 = /*#__PURE__*/createContext(initialState$2);
20023
+ const store$3 = /*#__PURE__*/createContext(initialState$3);
19767
20024
  const {
19768
- Provider: Provider$2
19769
- } = store$2;
20025
+ Provider: Provider$3
20026
+ } = store$3;
19770
20027
 
19771
20028
  const PaymentMethodSelectContainer = ({
19772
20029
  style,
@@ -19811,7 +20068,7 @@ const PaymentMethodSelectContainer = ({
19811
20068
  default:
19812
20069
  return state;
19813
20070
  }
19814
- }, initialState$2);
20071
+ }, initialState$3);
19815
20072
  useEffect(() => {
19816
20073
  var _window$Pelcro$user$r4;
19817
20074
 
@@ -19824,16 +20081,16 @@ const PaymentMethodSelectContainer = ({
19824
20081
  style: { ...style
19825
20082
  },
19826
20083
  className: `pelcro-container pelcro-payment-select-container ${className}`
19827
- }, /*#__PURE__*/React__default.createElement(Provider$2, {
20084
+ }, /*#__PURE__*/React__default.createElement(Provider$3, {
19828
20085
  value: {
19829
20086
  state,
19830
20087
  dispatch
19831
20088
  }
19832
20089
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19833
- store: store$2,
20090
+ store: store$3,
19834
20091
  key: i
19835
20092
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19836
- store: store$2
20093
+ store: store$3
19837
20094
  })));
19838
20095
  };
19839
20096
 
@@ -19847,7 +20104,7 @@ const PaymentMethodSelectList = () => {
19847
20104
  paymentMethods,
19848
20105
  selectedPaymentMethodId
19849
20106
  }
19850
- } = useContext(store$2);
20107
+ } = useContext(store$3);
19851
20108
 
19852
20109
  const handlePaymentMethodSelect = event => {
19853
20110
  dispatch({
@@ -19897,7 +20154,7 @@ const PaymentMethodSelectSubmit = ({
19897
20154
  selectedPaymentMethodId,
19898
20155
  isSubmitting
19899
20156
  }
19900
- } = useContext(store$2);
20157
+ } = useContext(store$3);
19901
20158
  return /*#__PURE__*/React__default.createElement(Button, Object.assign({
19902
20159
  onClick: () => {
19903
20160
  dispatch({
@@ -19971,8 +20228,8 @@ const PaymentMethodSelectModal = ({
19971
20228
  };
19972
20229
  PaymentMethodSelectModal.viewId = "payment-method-select";
19973
20230
 
19974
- function _extends$h() {
19975
- _extends$h = Object.assign || function (target) {
20231
+ function _extends$i() {
20232
+ _extends$i = Object.assign || function (target) {
19976
20233
  for (var i = 1; i < arguments.length; i++) {
19977
20234
  var source = arguments[i];
19978
20235
 
@@ -19986,7 +20243,7 @@ function _extends$h() {
19986
20243
  return target;
19987
20244
  };
19988
20245
 
19989
- return _extends$h.apply(this, arguments);
20246
+ return _extends$i.apply(this, arguments);
19990
20247
  }
19991
20248
 
19992
20249
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -20170,7 +20427,7 @@ function render(props, propsBag, defaultTag, features, visible) {
20170
20427
  return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
20171
20428
  return null;
20172
20429
  }, _match[RenderStrategy.Hidden] = function () {
20173
- return _render(_extends$h({}, _rest, {
20430
+ return _render(_extends$i({}, _rest, {
20174
20431
  hidden: true,
20175
20432
  style: {
20176
20433
  display: 'none'
@@ -20698,7 +20955,7 @@ function TransitionChild(props) {
20698
20955
  var passthroughProps = rest;
20699
20956
  return React__default.createElement(NestingContext.Provider, {
20700
20957
  value: nesting
20701
- }, render(_extends$h({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
20958
+ }, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
20702
20959
  }
20703
20960
 
20704
20961
  function Transition(props) {
@@ -20742,7 +20999,7 @@ function Transition(props) {
20742
20999
  value: nestingBag
20743
21000
  }, React__default.createElement(TransitionContext.Provider, {
20744
21001
  value: transitionBag
20745
- }, render(_extends$h({}, sharedProps, {
21002
+ }, render(_extends$i({}, sharedProps, {
20746
21003
  as: Fragment,
20747
21004
  children: React__default.createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
20748
21005
  }), propsBag, Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
@@ -20869,12 +21126,12 @@ var ActionTypes;
20869
21126
  })(ActionTypes || (ActionTypes = {}));
20870
21127
 
20871
21128
  (_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
20872
- return _extends$h({}, state, {
21129
+ return _extends$i({}, state, {
20873
21130
  activeItemIndex: null,
20874
21131
  menuState: MenuStates.Closed
20875
21132
  });
20876
21133
  }, _reducers[ActionTypes.OpenMenu] = function (state) {
20877
- return _extends$h({}, state, {
21134
+ return _extends$i({}, state, {
20878
21135
  menuState: MenuStates.Open
20879
21136
  });
20880
21137
  }, _reducers[ActionTypes.GoToItem] = function (state, action) {
@@ -20893,7 +21150,7 @@ var ActionTypes;
20893
21150
  }
20894
21151
  });
20895
21152
  if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
20896
- return _extends$h({}, state, {
21153
+ return _extends$i({}, state, {
20897
21154
  searchQuery: '',
20898
21155
  activeItemIndex: activeItemIndex
20899
21156
  });
@@ -20904,19 +21161,19 @@ var ActionTypes;
20904
21161
 
20905
21162
  return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
20906
21163
  });
20907
- if (match === -1 || match === state.activeItemIndex) return _extends$h({}, state, {
21164
+ if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
20908
21165
  searchQuery: searchQuery
20909
21166
  });
20910
- return _extends$h({}, state, {
21167
+ return _extends$i({}, state, {
20911
21168
  searchQuery: searchQuery,
20912
21169
  activeItemIndex: match
20913
21170
  });
20914
21171
  }, _reducers[ActionTypes.ClearSearch] = function (state) {
20915
- return _extends$h({}, state, {
21172
+ return _extends$i({}, state, {
20916
21173
  searchQuery: ''
20917
21174
  });
20918
21175
  }, _reducers[ActionTypes.RegisterItem] = function (state, action) {
20919
- return _extends$h({}, state, {
21176
+ return _extends$i({}, state, {
20920
21177
  items: [].concat(state.items, [{
20921
21178
  id: action.id,
20922
21179
  dataRef: action.dataRef
@@ -20929,7 +21186,7 @@ var ActionTypes;
20929
21186
  return a.id === action.id;
20930
21187
  });
20931
21188
  if (idx !== -1) nextItems.splice(idx, 1);
20932
- return _extends$h({}, state, {
21189
+ return _extends$i({}, state, {
20933
21190
  items: nextItems,
20934
21191
  activeItemIndex: function () {
20935
21192
  if (idx === state.activeItemIndex) return null;
@@ -20968,19 +21225,19 @@ var ActionTypes$1;
20968
21225
  (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
20969
21226
  if (state.disabled) return state;
20970
21227
  if (state.listboxState === ListboxStates.Closed) return state;
20971
- return _extends$h({}, state, {
21228
+ return _extends$i({}, state, {
20972
21229
  activeOptionIndex: null,
20973
21230
  listboxState: ListboxStates.Closed
20974
21231
  });
20975
21232
  }, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
20976
21233
  if (state.disabled) return state;
20977
21234
  if (state.listboxState === ListboxStates.Open) return state;
20978
- return _extends$h({}, state, {
21235
+ return _extends$i({}, state, {
20979
21236
  listboxState: ListboxStates.Open
20980
21237
  });
20981
21238
  }, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
20982
21239
  if (state.disabled === action.disabled) return state;
20983
- return _extends$h({}, state, {
21240
+ return _extends$i({}, state, {
20984
21241
  disabled: action.disabled
20985
21242
  });
20986
21243
  }, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
@@ -21001,7 +21258,7 @@ var ActionTypes$1;
21001
21258
  }
21002
21259
  });
21003
21260
  if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
21004
- return _extends$h({}, state, {
21261
+ return _extends$i({}, state, {
21005
21262
  searchQuery: '',
21006
21263
  activeOptionIndex: activeOptionIndex
21007
21264
  });
@@ -21014,10 +21271,10 @@ var ActionTypes$1;
21014
21271
 
21015
21272
  return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
21016
21273
  });
21017
- if (match === -1 || match === state.activeOptionIndex) return _extends$h({}, state, {
21274
+ if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
21018
21275
  searchQuery: searchQuery
21019
21276
  });
21020
- return _extends$h({}, state, {
21277
+ return _extends$i({}, state, {
21021
21278
  searchQuery: searchQuery,
21022
21279
  activeOptionIndex: match
21023
21280
  });
@@ -21025,11 +21282,11 @@ var ActionTypes$1;
21025
21282
  if (state.disabled) return state;
21026
21283
  if (state.listboxState === ListboxStates.Closed) return state;
21027
21284
  if (state.searchQuery === '') return state;
21028
- return _extends$h({}, state, {
21285
+ return _extends$i({}, state, {
21029
21286
  searchQuery: ''
21030
21287
  });
21031
21288
  }, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
21032
- return _extends$h({}, state, {
21289
+ return _extends$i({}, state, {
21033
21290
  options: [].concat(state.options, [{
21034
21291
  id: action.id,
21035
21292
  dataRef: action.dataRef
@@ -21042,7 +21299,7 @@ var ActionTypes$1;
21042
21299
  return a.id === action.id;
21043
21300
  });
21044
21301
  if (idx !== -1) nextOptions.splice(idx, 1);
21045
- return _extends$h({}, state, {
21302
+ return _extends$i({}, state, {
21046
21303
  options: nextOptions,
21047
21304
  activeOptionIndex: function () {
21048
21305
  if (idx === state.activeOptionIndex) return null;
@@ -21103,18 +21360,18 @@ const getPaymentCardIcon = name => {
21103
21360
  }));
21104
21361
  };
21105
21362
 
21106
- var _path$f;
21363
+ var _path$g;
21107
21364
 
21108
- function _extends$g() { _extends$g = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
21365
+ function _extends$h() { _extends$h = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
21109
21366
 
21110
21367
  function SvgChevronRight(props) {
21111
- return /*#__PURE__*/React.createElement("svg", _extends$g({
21368
+ return /*#__PURE__*/React.createElement("svg", _extends$h({
21112
21369
  className: "plc-w-6 plc-h-6",
21113
21370
  xmlns: "http://www.w3.org/2000/svg",
21114
21371
  fill: "none",
21115
21372
  viewBox: "0 0 24 24",
21116
21373
  stroke: "currentColor"
21117
- }, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
21374
+ }, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
21118
21375
  strokeLinecap: "round",
21119
21376
  strokeLinejoin: "round",
21120
21377
  strokeWidth: 2,
@@ -21330,18 +21587,18 @@ const SavedItems = ({
21330
21587
  });
21331
21588
  };
21332
21589
 
21333
- var _path$e;
21590
+ var _path$f;
21334
21591
 
21335
- function _extends$f() { _extends$f = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
21592
+ function _extends$g() { _extends$g = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
21336
21593
 
21337
21594
  function SvgRefresh(props) {
21338
- return /*#__PURE__*/React.createElement("svg", _extends$f({
21595
+ return /*#__PURE__*/React.createElement("svg", _extends$g({
21339
21596
  className: "plc-w-4 plc-h-4 plc-mr-1",
21340
21597
  xmlns: "http://www.w3.org/2000/svg",
21341
21598
  fill: "none",
21342
21599
  viewBox: "0 0 24 24",
21343
21600
  stroke: "currentColor"
21344
- }, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
21601
+ }, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
21345
21602
  strokeLinecap: "round",
21346
21603
  strokeLinejoin: "round",
21347
21604
  strokeWidth: 2,
@@ -21349,35 +21606,35 @@ function SvgRefresh(props) {
21349
21606
  })));
21350
21607
  }
21351
21608
 
21352
- var _path$d;
21609
+ var _path$e;
21353
21610
 
21354
- function _extends$e() { _extends$e = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
21611
+ function _extends$f() { _extends$f = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
21355
21612
 
21356
21613
  function SvgCalendar(props) {
21357
- return /*#__PURE__*/React.createElement("svg", _extends$e({
21614
+ return /*#__PURE__*/React.createElement("svg", _extends$f({
21358
21615
  xmlns: "http://www.w3.org/2000/svg",
21359
21616
  className: "plc-h-4 plc-w-4 plc-mr-1",
21360
21617
  viewBox: "0 0 20 20",
21361
21618
  fill: "currentColor"
21362
- }, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
21619
+ }, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
21363
21620
  fillRule: "evenodd",
21364
21621
  d: "M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",
21365
21622
  clipRule: "evenodd"
21366
21623
  })));
21367
21624
  }
21368
21625
 
21369
- var _path$c;
21626
+ var _path$d;
21370
21627
 
21371
- function _extends$d() { _extends$d = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
21628
+ function _extends$e() { _extends$e = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
21372
21629
 
21373
21630
  function SvgPlus(props) {
21374
- return /*#__PURE__*/React.createElement("svg", _extends$d({
21631
+ return /*#__PURE__*/React.createElement("svg", _extends$e({
21375
21632
  className: "plc-w-5 plc-h-5",
21376
21633
  xmlns: "http://www.w3.org/2000/svg",
21377
21634
  fill: "none",
21378
21635
  viewBox: "0 0 24 24",
21379
21636
  stroke: "currentColor"
21380
- }, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
21637
+ }, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
21381
21638
  strokeLinecap: "round",
21382
21639
  strokeLinejoin: "round",
21383
21640
  strokeWidth: 2,
@@ -21385,17 +21642,17 @@ function SvgPlus(props) {
21385
21642
  })));
21386
21643
  }
21387
21644
 
21388
- var _path$b;
21645
+ var _path$c;
21389
21646
 
21390
- function _extends$c() { _extends$c = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
21647
+ function _extends$d() { _extends$d = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
21391
21648
 
21392
21649
  function SvgCheckMark(props) {
21393
- return /*#__PURE__*/React.createElement("svg", _extends$c({
21650
+ return /*#__PURE__*/React.createElement("svg", _extends$d({
21394
21651
  className: "plc-w-4 plc-h-4 plc-mr-1",
21395
21652
  xmlns: "http://www.w3.org/2000/svg",
21396
21653
  viewBox: "0 0 20 20",
21397
21654
  fill: "currentColor"
21398
- }, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
21655
+ }, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
21399
21656
  fillRule: "evenodd",
21400
21657
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
21401
21658
  clipRule: "evenodd"
@@ -21690,18 +21947,18 @@ Accordion.item = function AccordionItem({
21690
21947
  }, content)) : null;
21691
21948
  };
21692
21949
 
21693
- var _path$a;
21950
+ var _path$b;
21694
21951
 
21695
- function _extends$b() { _extends$b = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
21952
+ function _extends$c() { _extends$c = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
21696
21953
 
21697
21954
  function SvgExit(props) {
21698
- return /*#__PURE__*/React.createElement("svg", _extends$b({
21955
+ return /*#__PURE__*/React.createElement("svg", _extends$c({
21699
21956
  className: "plc-w-6 plc-h-6",
21700
21957
  xmlns: "http://www.w3.org/2000/svg",
21701
21958
  fill: "none",
21702
21959
  viewBox: "0 0 24 24",
21703
21960
  stroke: "currentColor"
21704
- }, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
21961
+ }, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
21705
21962
  strokeLinecap: "round",
21706
21963
  strokeLinejoin: "round",
21707
21964
  strokeWidth: 2,
@@ -21709,13 +21966,32 @@ function SvgExit(props) {
21709
21966
  })));
21710
21967
  }
21711
21968
 
21969
+ var _path$a;
21970
+
21971
+ function _extends$b() { _extends$b = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
21972
+
21973
+ function SvgUser(props) {
21974
+ return /*#__PURE__*/React.createElement("svg", _extends$b({
21975
+ xmlns: "http://www.w3.org/2000/svg",
21976
+ fill: "none",
21977
+ viewBox: "0 0 24 24",
21978
+ stroke: "currentColor"
21979
+ }, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
21980
+ strokeLinecap: "round",
21981
+ strokeLinejoin: "round",
21982
+ strokeWidth: 2,
21983
+ d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zm-4 7a7 7 0 00-7 7h14a7 7 0 00-7-7z"
21984
+ })));
21985
+ }
21986
+
21712
21987
  var _path$9;
21713
21988
 
21714
21989
  function _extends$a() { _extends$a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
21715
21990
 
21716
- function SvgUser(props) {
21991
+ function SvgNewsletter(props) {
21717
21992
  return /*#__PURE__*/React.createElement("svg", _extends$a({
21718
21993
  xmlns: "http://www.w3.org/2000/svg",
21994
+ className: "plc-h-5 plc-w-5",
21719
21995
  fill: "none",
21720
21996
  viewBox: "0 0 24 24",
21721
21997
  stroke: "currentColor"
@@ -21723,7 +21999,7 @@ function SvgUser(props) {
21723
21999
  strokeLinecap: "round",
21724
22000
  strokeLinejoin: "round",
21725
22001
  strokeWidth: 2,
21726
- d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zm-4 7a7 7 0 00-7 7h14a7 7 0 00-7-7z"
22002
+ d: "M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"
21727
22003
  })));
21728
22004
  }
21729
22005
 
@@ -21731,10 +22007,10 @@ var _path$8;
21731
22007
 
21732
22008
  function _extends$9() { _extends$9 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
21733
22009
 
21734
- function SvgNewsletter(props) {
22010
+ function SvgDocument(props) {
21735
22011
  return /*#__PURE__*/React.createElement("svg", _extends$9({
21736
22012
  xmlns: "http://www.w3.org/2000/svg",
21737
- className: "plc-h-5 plc-w-5",
22013
+ className: "plc-h-6 plc-w-6 plc-mr-2",
21738
22014
  fill: "none",
21739
22015
  viewBox: "0 0 24 24",
21740
22016
  stroke: "currentColor"
@@ -21742,7 +22018,7 @@ function SvgNewsletter(props) {
21742
22018
  strokeLinecap: "round",
21743
22019
  strokeLinejoin: "round",
21744
22020
  strokeWidth: 2,
21745
- d: "M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"
22021
+ d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
21746
22022
  })));
21747
22023
  }
21748
22024
 
@@ -21910,9 +22186,11 @@ const DonationsMenu = () => {
21910
22186
  };
21911
22187
 
21912
22188
  function getDonationSubs() {
21913
- var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
22189
+ var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r, _window$Pelcro$user$r2;
21914
22190
 
21915
- 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 : [];
22191
+ 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 : [];
22192
+ 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 : [];
22193
+ return [...donations, ...canceledDonations];
21916
22194
  }
21917
22195
 
21918
22196
  function formatStartDate(date) {
@@ -21920,6 +22198,138 @@ function formatStartDate(date) {
21920
22198
  return new Intl.DateTimeFormat("en-CA").format(startDate);
21921
22199
  }
21922
22200
 
22201
+ const InvoicesMenu = props => {
22202
+ const {
22203
+ t
22204
+ } = useTranslation("dashboard");
22205
+ return /*#__PURE__*/React__default.createElement("table", {
22206
+ className: "plc-w-full plc-table-fixed"
22207
+ }, /*#__PURE__*/React__default.createElement("thead", {
22208
+ className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
22209
+ }, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
22210
+ className: "plc-w-4/12 "
22211
+ }, t("labels.details")), /*#__PURE__*/React__default.createElement("th", {
22212
+ className: "plc-w-4/12 "
22213
+ }, t("labels.status.title")), /*#__PURE__*/React__default.createElement("th", {
22214
+ className: "plc-w-3/12 "
22215
+ }, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
22216
+ className: "plc-h-4"
22217
+ }), /*#__PURE__*/React__default.createElement(InvoicesItems, props)));
22218
+ };
22219
+
22220
+ const InvoicesItems = () => {
22221
+ var _window$Pelcro$invoic, _window$Pelcro$invoic2;
22222
+
22223
+ const {
22224
+ t
22225
+ } = useTranslation("dashboard");
22226
+ const {
22227
+ setInvoice,
22228
+ switchView
22229
+ } = usePelcro();
22230
+ const invoices = (_window$Pelcro$invoic = (_window$Pelcro$invoic2 = window.Pelcro.invoice.list()) === null || _window$Pelcro$invoic2 === void 0 ? void 0 : _window$Pelcro$invoic2.filter(invoice => invoice.total > 0)) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
22231
+
22232
+ const showInvoiceDetails = event => {
22233
+ if (setInvoice(event.target.dataset.id)) {
22234
+ switchView("invoice-details");
22235
+ }
22236
+ };
22237
+
22238
+ if (invoices.length === 0) return null;
22239
+ return invoices.sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime()).map(invoice => {
22240
+ const invoiceStatus = getInvoiceStatus(invoice);
22241
+ const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(new Date(invoice.created_at));
22242
+ return /*#__PURE__*/React__default.createElement("tr", {
22243
+ key: invoice.id,
22244
+ className: `plc-w-full plc-align-middle plc-cursor-pointer accordion-header hover:plc-bg-gray-50`
22245
+ }, /*#__PURE__*/React__default.createElement("td", {
22246
+ className: "plc-truncate"
22247
+ }, /*#__PURE__*/React__default.createElement("span", {
22248
+ className: "plc-font-semibold plc-text-gray-500"
22249
+ }, `#${invoice.id}`), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
22250
+ className: "plc-text-sm plc-text-gray-500"
22251
+ }, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
22252
+ className: "plc-text-sm plc-text-gray-500"
22253
+ }, formattedCreationDate)), /*#__PURE__*/React__default.createElement("td", {
22254
+ className: "plc-py-2"
22255
+ }, /*#__PURE__*/React__default.createElement("span", {
22256
+ className: `plc-inline-flex plc-p-1 plc-text-xs plc-font-semibold ${invoiceStatus.bgColor} plc-uppercase ${invoiceStatus.textColor} plc-rounded-lg`
22257
+ }, invoiceStatus.icon, invoiceStatus.title)), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(Button, {
22258
+ variant: "ghost",
22259
+ className: "plc-text-blue-400 focus:plc-ring-blue-400 pelcro-dashboard-view-invoice-button",
22260
+ icon: /*#__PURE__*/React__default.createElement(SvgDocument, {
22261
+ className: "plc-w-4 plc-h-4"
22262
+ }),
22263
+ onClick: showInvoiceDetails,
22264
+ "data-id": invoice.id
22265
+ }, t("labels.view"))));
22266
+ });
22267
+ };
22268
+
22269
+ function getInvoiceStatus(invoice) {
22270
+ const translations = i18next.t("dashboard:labels", {
22271
+ returnObjects: true
22272
+ });
22273
+
22274
+ switch (invoice.status) {
22275
+ case "paid":
22276
+ return {
22277
+ textColor: "plc-text-green-700",
22278
+ bgColor: "plc-bg-green-100",
22279
+ icon: /*#__PURE__*/React__default.createElement(SvgCheckMark, null),
22280
+ title: translations.paid
22281
+ };
22282
+
22283
+ case "past_due":
22284
+ return {
22285
+ textColor: "plc-text-orange-700",
22286
+ bgColor: "plc-bg-orange-100",
22287
+ icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null),
22288
+ title: translations.pastDue
22289
+ };
22290
+
22291
+ case "open":
22292
+ return {
22293
+ textColor: "plc-text-yellow-700",
22294
+ bgColor: "plc-bg-yellow-100",
22295
+ icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null),
22296
+ title: translations.open
22297
+ };
22298
+
22299
+ case "draft":
22300
+ return {
22301
+ textColor: "plc-text-blue-700",
22302
+ bgColor: "plc-bg-blue-100",
22303
+ icon: /*#__PURE__*/React__default.createElement(SvgEdit, null),
22304
+ title: translations.draft
22305
+ };
22306
+
22307
+ case "scheduled":
22308
+ return {
22309
+ textColor: "plc-text-blue-700",
22310
+ bgColor: "plc-bg-blue-100",
22311
+ icon: /*#__PURE__*/React__default.createElement(SvgCalendar, null),
22312
+ title: translations.scheduled
22313
+ };
22314
+
22315
+ case "uncollectible":
22316
+ return {
22317
+ textColor: "plc-text-red-700",
22318
+ bgColor: "plc-bg-red-100",
22319
+ icon: /*#__PURE__*/React__default.createElement(SvgXIconSolid, null),
22320
+ title: translations.uncollectible
22321
+ };
22322
+
22323
+ case "void":
22324
+ return {
22325
+ textColor: "plc-text-gray-700",
22326
+ bgColor: "plc-bg-gray-100",
22327
+ icon: /*#__PURE__*/React__default.createElement(SvgXIconSolid, null),
22328
+ title: translations.void
22329
+ };
22330
+ }
22331
+ }
22332
+
21923
22333
  const SUB_MENUS = {
21924
22334
  PROFILE: "profile",
21925
22335
  SUBSCRIPTIONS: "subscriptions",
@@ -21928,6 +22338,7 @@ const SUB_MENUS = {
21928
22338
  ADDRESSES: "addresses",
21929
22339
  GIFTS: "gifts",
21930
22340
  ORDERS: "orders",
22341
+ INVOICES: "invoices",
21931
22342
  SAVED_ITEMS: "saved-items"
21932
22343
  };
21933
22344
  /**
@@ -22470,6 +22881,12 @@ class Dashboard extends Component {
22470
22881
  icon: /*#__PURE__*/React__default.createElement(SvgShopping, null),
22471
22882
  title: this.locale("labels.orders.label"),
22472
22883
  content: /*#__PURE__*/React__default.createElement(OrdersMenu, null)
22884
+ }), /*#__PURE__*/React__default.createElement(Accordion.item, {
22885
+ show: hasInvoices(),
22886
+ name: SUB_MENUS.INVOICES,
22887
+ icon: /*#__PURE__*/React__default.createElement(SvgDocument, null),
22888
+ title: this.locale("labels.invoices"),
22889
+ content: /*#__PURE__*/React__default.createElement(InvoicesMenu, null)
22473
22890
  }), /*#__PURE__*/React__default.createElement(Accordion.item, {
22474
22891
  name: SUB_MENUS.SAVED_ITEMS,
22475
22892
  icon: /*#__PURE__*/React__default.createElement(SvgBookmark, null),
@@ -22485,11 +22902,19 @@ class Dashboard extends Component {
22485
22902
 
22486
22903
  }
22487
22904
 
22905
+ function hasInvoices() {
22906
+ var _window$Pelcro$invoic, _window$Pelcro$invoic2;
22907
+
22908
+ const invoices = (_window$Pelcro$invoic = (_window$Pelcro$invoic2 = window.Pelcro.invoice.list()) === null || _window$Pelcro$invoic2 === void 0 ? void 0 : _window$Pelcro$invoic2.filter(invoice => invoice.total > 0)) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
22909
+ return invoices.length > 0;
22910
+ }
22911
+
22488
22912
  function hasDonationSubs() {
22489
- var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
22913
+ var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
22490
22914
 
22491
- 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)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
22492
- return donations.length > 0;
22915
+ 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 : [];
22916
+ 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 : [];
22917
+ return donations.length > 0 || canceledDonations.length > 0;
22493
22918
  }
22494
22919
 
22495
22920
  const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
@@ -22519,7 +22944,7 @@ const DashboardOpenButton = () => {
22519
22944
  };
22520
22945
  DashboardOpenButton.viewId = "dashboard-open";
22521
22946
 
22522
- const initialState$1 = {
22947
+ const initialState$2 = {
22523
22948
  imageSrc: null,
22524
22949
  crop: {
22525
22950
  x: 0,
@@ -22533,10 +22958,10 @@ const initialState$1 = {
22533
22958
  content: ""
22534
22959
  }
22535
22960
  };
22536
- const store$1 = /*#__PURE__*/createContext(initialState$1);
22961
+ const store$2 = /*#__PURE__*/createContext(initialState$2);
22537
22962
  const {
22538
- Provider: Provider$1
22539
- } = store$1;
22963
+ Provider: Provider$2
22964
+ } = store$2;
22540
22965
 
22541
22966
  const ProfilePicChangeContainer = ({
22542
22967
  style,
@@ -22670,21 +23095,21 @@ const ProfilePicChangeContainer = ({
22670
23095
  default:
22671
23096
  return state;
22672
23097
  }
22673
- }, initialState$1);
23098
+ }, initialState$2);
22674
23099
  return /*#__PURE__*/React__default.createElement("div", {
22675
23100
  style: { ...style
22676
23101
  },
22677
23102
  className: `pelcro-container pelcro-profile-picture-container ${className}`
22678
- }, /*#__PURE__*/React__default.createElement(Provider$1, {
23103
+ }, /*#__PURE__*/React__default.createElement(Provider$2, {
22679
23104
  value: {
22680
23105
  state,
22681
23106
  dispatch
22682
23107
  }
22683
23108
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
22684
- store: store$1,
23109
+ store: store$2,
22685
23110
  key: i
22686
23111
  })) : /*#__PURE__*/React__default.cloneElement(children, {
22687
- store: store$1
23112
+ store: store$2
22688
23113
  })));
22689
23114
  };
22690
23115
  /**
@@ -22746,7 +23171,7 @@ const ProfilePicChangeButton = ({
22746
23171
  isSubmitting
22747
23172
  },
22748
23173
  dispatch
22749
- } = useContext(store$1);
23174
+ } = useContext(store$2);
22750
23175
  const {
22751
23176
  t
22752
23177
  } = useTranslation("userEdit");
@@ -24114,7 +24539,7 @@ const ProfilePicChangeCropper = ({
24114
24539
  zoom
24115
24540
  },
24116
24541
  dispatch
24117
- } = useContext(store$1);
24542
+ } = useContext(store$2);
24118
24543
  return /*#__PURE__*/React__default.createElement("div", {
24119
24544
  className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
24120
24545
  }, /*#__PURE__*/React__default.createElement(Cropper, Object.assign({
@@ -24156,7 +24581,7 @@ const ProfilePicChangeZoom = ({
24156
24581
  zoom
24157
24582
  },
24158
24583
  dispatch
24159
- } = useContext(store$1);
24584
+ } = useContext(store$2);
24160
24585
  const {
24161
24586
  t
24162
24587
  } = useTranslation("userEdit");
@@ -24208,7 +24633,7 @@ const ProfilePicChangeSelectButton = ({
24208
24633
  state: {
24209
24634
  isSubmitting
24210
24635
  }
24211
- } = useContext(store$1);
24636
+ } = useContext(store$2);
24212
24637
  const {
24213
24638
  t
24214
24639
  } = useTranslation("userEdit");
@@ -24250,7 +24675,7 @@ const ProfilePicChangeRemoveButton = ({
24250
24675
  state: {
24251
24676
  isSubmitting
24252
24677
  }
24253
- } = useContext(store$1);
24678
+ } = useContext(store$2);
24254
24679
  const {
24255
24680
  t
24256
24681
  } = useTranslation("userEdit");
@@ -24273,7 +24698,7 @@ const ProfilePicChangeWrapper = () => {
24273
24698
  state: {
24274
24699
  imageSrc
24275
24700
  }
24276
- } = useContext(store$1);
24701
+ } = useContext(store$2);
24277
24702
  const {
24278
24703
  t
24279
24704
  } = useTranslation("userEdit");
@@ -24335,17 +24760,17 @@ function ProfilePicChangeModal({
24335
24760
  }
24336
24761
  ProfilePicChangeModal.viewId = "profile-picture";
24337
24762
 
24338
- const initialState = {
24763
+ const initialState$1 = {
24339
24764
  isSubmitting: false,
24340
24765
  alert: {
24341
24766
  type: "error",
24342
24767
  content: ""
24343
24768
  }
24344
24769
  };
24345
- const store = /*#__PURE__*/createContext(initialState);
24770
+ const store$1 = /*#__PURE__*/createContext(initialState$1);
24346
24771
  const {
24347
- Provider
24348
- } = store;
24772
+ Provider: Provider$1
24773
+ } = store$1;
24349
24774
 
24350
24775
  const EmailVerifyContainer = ({
24351
24776
  style,
@@ -24408,21 +24833,21 @@ const EmailVerifyContainer = ({
24408
24833
  default:
24409
24834
  return state;
24410
24835
  }
24411
- }, initialState);
24836
+ }, initialState$1);
24412
24837
  return /*#__PURE__*/React__default.createElement("div", {
24413
24838
  style: { ...style
24414
24839
  },
24415
24840
  className: `pelcro-container pelcro-email-verify-container ${className}`
24416
- }, /*#__PURE__*/React__default.createElement(Provider, {
24841
+ }, /*#__PURE__*/React__default.createElement(Provider$1, {
24417
24842
  value: {
24418
24843
  state,
24419
24844
  dispatch
24420
24845
  }
24421
24846
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
24422
- store,
24847
+ store: store$1,
24423
24848
  key: i
24424
24849
  })) : /*#__PURE__*/React__default.cloneElement(children, {
24425
- store
24850
+ store: store$1
24426
24851
  })));
24427
24852
  };
24428
24853
 
@@ -24436,7 +24861,7 @@ const EmailVerifyResendButton = ({
24436
24861
  state: {
24437
24862
  isSubmitting
24438
24863
  }
24439
- } = useContext(store);
24864
+ } = useContext(store$1);
24440
24865
  const {
24441
24866
  t
24442
24867
  } = useTranslation("verifyEmail");
@@ -24511,4 +24936,233 @@ const EmailVerifyModal = ({
24511
24936
  };
24512
24937
  EmailVerifyModal.viewId = "email-verify";
24513
24938
 
24514
- export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, Input, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, notify, unauthenticatedButtons, usePelcro };
24939
+ const InvoicePaymentContainer = props => /*#__PURE__*/React__default.createElement(PaymentMethodContainer, Object.assign({
24940
+ type: "invoicePayment",
24941
+ className: "pelcro-invoice-payment-container"
24942
+ }, props));
24943
+
24944
+ const InvoicePaymentView = props => {
24945
+ const {
24946
+ t
24947
+ } = useTranslation("payment");
24948
+ return /*#__PURE__*/React__default.createElement("div", {
24949
+ id: "pelcro-invoice-payment-view"
24950
+ }, /*#__PURE__*/React__default.createElement("div", {
24951
+ className: "plc-mb-6 plc-text-2xl plc-font-semibold plc-text-center plc-text-gray-900 pelcro-title-wrapper"
24952
+ }, /*#__PURE__*/React__default.createElement("h4", null, t("labels.checkout.title"))), /*#__PURE__*/React__default.createElement("form", {
24953
+ action: "javascript:void(0);",
24954
+ className: "plc-mt-2 pelcro-form"
24955
+ }, /*#__PURE__*/React__default.createElement(PaymentMethodView, Object.assign({
24956
+ type: "invoicePayment",
24957
+ showCoupon: false,
24958
+ showExternalPaymentMethods: true
24959
+ }, props))));
24960
+ };
24961
+
24962
+ const InvoicePaymentModal = ({
24963
+ onDisplay,
24964
+ onClose,
24965
+ ...otherProps
24966
+ }) => {
24967
+ const {
24968
+ switchView
24969
+ } = usePelcro();
24970
+
24971
+ const onSuccess = () => {
24972
+ var _otherProps$onSuccess;
24973
+
24974
+ (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
24975
+ return switchView("subscription-success");
24976
+ };
24977
+
24978
+ return /*#__PURE__*/React__default.createElement(Modal, {
24979
+ id: "pelcro-invoice-payment-modal",
24980
+ onDisplay: onDisplay,
24981
+ onClose: onClose
24982
+ }, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(InvoicePaymentView, Object.assign({}, otherProps, {
24983
+ onSuccess: onSuccess
24984
+ }))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
24985
+ };
24986
+ InvoicePaymentModal.viewId = "invoice-payment";
24987
+
24988
+ const invoicePaymentSubmitButton = props => {
24989
+ return /*#__PURE__*/React__default.createElement(SubmitPaymentMethod, props);
24990
+ };
24991
+
24992
+ const initialState = {};
24993
+ const store = /*#__PURE__*/createContext(initialState);
24994
+ const {
24995
+ Provider
24996
+ } = store;
24997
+
24998
+ const InvoiceDetailsContainer = ({
24999
+ style,
25000
+ className = "",
25001
+ onSuccess = () => {},
25002
+ children,
25003
+ ...props
25004
+ }) => {
25005
+ const onPayButtonClick = () => {
25006
+ return onSuccess();
25007
+ };
25008
+
25009
+ const [state, dispatch] = useReducerWithSideEffects((state, action) => {
25010
+ switch (action.type) {
25011
+ case HANDLE_SUBMIT:
25012
+ return lib_4((state, dispatch) => onPayButtonClick());
25013
+
25014
+ default:
25015
+ return state;
25016
+ }
25017
+ }, initialState);
25018
+ return /*#__PURE__*/React__default.createElement("div", {
25019
+ style: { ...style
25020
+ },
25021
+ className: `pelcro-container pelcro-invoice-details-container ${className}`
25022
+ }, /*#__PURE__*/React__default.createElement(Provider, {
25023
+ value: {
25024
+ state,
25025
+ dispatch
25026
+ }
25027
+ }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
25028
+ store,
25029
+ key: i
25030
+ })) : /*#__PURE__*/React__default.cloneElement(children, {
25031
+ store
25032
+ })));
25033
+ };
25034
+
25035
+ const InvoiceDetailsDownloadButton = ({
25036
+ name,
25037
+ url,
25038
+ className,
25039
+ ...otherProps
25040
+ }) => {
25041
+ const {
25042
+ t
25043
+ } = useTranslation("invoiceDetails");
25044
+ const {
25045
+ invoice
25046
+ } = usePelcro();
25047
+ return /*#__PURE__*/React__default.createElement(Link, Object.assign({
25048
+ className: `plc-px-6 plc-py-2 plc-uppercase plc-bg-transparent plc-text-primary-500 plc-border plc-border-primary-500 plc-rounded focus:plc-outline-none focus:plc-ring-2 focus:plc-ring-primary-300 plc-tracking-wider hover:plc-bg-primary-600 focus:plc-bg-primary-600 hover:plc-text-white focus:plc-text-white hover:plc-shadow-none plc-no-underline ${className}`,
25049
+ id: "pelcro-download-invoice-link",
25050
+ href: url !== null && url !== void 0 ? url : invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
25051
+ target: "_blank",
25052
+ rel: "noopener noreferrer"
25053
+ }, otherProps), name !== null && name !== void 0 ? name : t("buttons.download"));
25054
+ };
25055
+
25056
+ const InvoiceDetailsPayButton = ({
25057
+ name,
25058
+ onClick,
25059
+ ...otherProps
25060
+ }) => {
25061
+ const {
25062
+ dispatch
25063
+ } = useContext(store);
25064
+ const {
25065
+ t
25066
+ } = useTranslation("invoiceDetails");
25067
+ return /*#__PURE__*/React__default.createElement(Button, Object.assign({
25068
+ onClick: () => {
25069
+ dispatch({
25070
+ type: HANDLE_SUBMIT
25071
+ });
25072
+ onClick === null || onClick === void 0 ? void 0 : onClick();
25073
+ }
25074
+ }, otherProps), name !== null && name !== void 0 ? name : t("buttons.pay"));
25075
+ };
25076
+
25077
+ const InvoiceDetailsView = props => {
25078
+ const {
25079
+ t
25080
+ } = useTranslation("invoiceDetails");
25081
+ const {
25082
+ invoice
25083
+ } = usePelcro();
25084
+ const showPayButton = canPayInvoice(invoice);
25085
+ const creationDate = new Date(invoice === null || invoice === void 0 ? void 0 : invoice.created_at);
25086
+ const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(creationDate);
25087
+ return /*#__PURE__*/React__default.createElement("div", {
25088
+ id: "pelcro-invoice-details-view"
25089
+ }, /*#__PURE__*/React__default.createElement("div", {
25090
+ className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
25091
+ }, /*#__PURE__*/React__default.createElement("h4", {
25092
+ className: "plc-text-2xl plc-font-semibold"
25093
+ }, t("title"))), /*#__PURE__*/React__default.createElement("form", {
25094
+ action: "javascript:void(0);",
25095
+ className: "plc-mt-2 pelcro-form"
25096
+ }, /*#__PURE__*/React__default.createElement(InvoiceDetailsContainer, props, /*#__PURE__*/React__default.createElement("div", {
25097
+ className: "plc-mt-5 pelcro-invoice-summary-wrapper"
25098
+ }, /*#__PURE__*/React__default.createElement("p", {
25099
+ className: "plc-font-bold pelcro-invoice-summary-title"
25100
+ }, t("labels.summary")), invoice && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("p", {
25101
+ className: "plc-mr-2 pelcro-invoice-creation-date"
25102
+ }, `${t("labels.creationDate")} ${formattedCreationDate}`), /*#__PURE__*/React__default.createElement("div", {
25103
+ className: "plc-flex plc-items-center plc-pt-2 plc-mt-2 plc-border-t plc-border-gray-400 plc-min-h-12 plc-justify-between pelcro-invoice-plan-wrapper"
25104
+ }, /*#__PURE__*/React__default.createElement("div", {
25105
+ className: "plc-break-words pelcro-invoice-plan-name"
25106
+ }, invoice.plan.nickname), /*#__PURE__*/React__default.createElement("div", {
25107
+ className: "plc-text-center pelcro-invoice-summary-price"
25108
+ }, calcAndFormatItemsTotal([invoice.plan], invoice.currency))), /*#__PURE__*/React__default.createElement("div", {
25109
+ className: "plc-flex plc-justify-end plc-pt-2 plc-mt-2 plc-font-bold plc-border-t plc-border-gray-400 pelcro-invoice-total-wrapper"
25110
+ }, /*#__PURE__*/React__default.createElement("div", {
25111
+ className: "plc-mr-2 plc-flex plc-flex-col"
25112
+ }, /*#__PURE__*/React__default.createElement("p", {
25113
+ className: "pelcro-invoice-total-text"
25114
+ }, t("labels.total")), /*#__PURE__*/React__default.createElement("p", {
25115
+ className: "pelcro-invoice-total-text"
25116
+ }, t("labels.amountPaid")), /*#__PURE__*/React__default.createElement("p", {
25117
+ className: "plc-font-semibold pelcro-invoice-total-text"
25118
+ }, t("labels.amountDue"))), /*#__PURE__*/React__default.createElement("div", {
25119
+ className: "plc-flex plc-flex-col"
25120
+ }, /*#__PURE__*/React__default.createElement("p", {
25121
+ className: "pelcro-invoice-total"
25122
+ }, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default.createElement("p", {
25123
+ className: "pelcro-invoice-total"
25124
+ }, getFormattedPriceByLocal(invoice.amount_paid, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default.createElement("p", {
25125
+ className: "plc-font-semibold pelcro-invoice-total"
25126
+ }, getFormattedPriceByLocal(invoice.amount_remaining, invoice.currency, getPageOrDefaultLanguage())))))), /*#__PURE__*/React__default.createElement("div", {
25127
+ className: "plc-flex plc-items-center plc-justify-center plc-mt-4"
25128
+ }, /*#__PURE__*/React__default.createElement(InvoiceDetailsDownloadButton, {
25129
+ url: invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
25130
+ className: "plc-w-full plc-text-center"
25131
+ }), showPayButton && /*#__PURE__*/React__default.createElement(InvoiceDetailsPayButton, {
25132
+ role: "submit",
25133
+ className: "plc-ml-4 plc-w-full",
25134
+ id: "pelcro-submit"
25135
+ })))));
25136
+ };
25137
+
25138
+ function canPayInvoice(invoice) {
25139
+ return (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "open" || (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "past_due";
25140
+ }
25141
+
25142
+ const InvoiceDetailsModal = ({
25143
+ onDisplay,
25144
+ onClose,
25145
+ ...otherProps
25146
+ }) => {
25147
+ const {
25148
+ switchToPaymentView
25149
+ } = usePelcro();
25150
+
25151
+ const onSuccess = () => {
25152
+ var _otherProps$onSuccess;
25153
+
25154
+ (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
25155
+ switchToPaymentView();
25156
+ };
25157
+
25158
+ return /*#__PURE__*/React__default.createElement(Modal, {
25159
+ onDisplay: onDisplay,
25160
+ onClose: onClose,
25161
+ id: "pelcro-invoice-details-modal"
25162
+ }, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(InvoiceDetailsView, Object.assign({}, otherProps, {
25163
+ onSuccess: onSuccess
25164
+ }))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
25165
+ };
25166
+ InvoiceDetailsModal.viewId = "invoice-details";
25167
+
25168
+ export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };